/* Слой: страница panel — депозит (вёрстка); общие #000/#fff сведены к var из variables.css где дублировались. */
/* ---- Deposit: select coin box (same style as referral stats) ---- */
.panel-deposit-box {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    padding: 20px;
    box-sizing: border-box;
}

.panel-deposit-title {
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.98);
    font-family: pp-neue-machina-plain-regular, sans-serif;
    margin: 0 0 16px 0;
}

/* Coin grid */
.panel-deposit-coin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

/* Coin item: logo + name/rate in one row */
.panel-deposit-coin-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    flex-direction: row;
    align-items: center;
    align-self: center;
    gap: 12px;
    cursor: pointer;
    font: inherit;
    text-align: left;
}
.panel-deposit-coin-item.is-selected {
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.08);
}

.panel-deposit-coin-logo {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    border-radius: 100%;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.panel-deposit-coin-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 100%;
}

/* Stub placeholder: circle only when no logo (e.g. before load) */
.panel-deposit-coin-logo-stub {
    background: rgba(255, 255, 255, 0.18);
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    border-radius: 100%;
}
.panel-deposit-detail-coin .panel-deposit-coin-logo-stub {
    width: 32px;
    height: 32px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 0;
    min-width: 0;
}

.panel-deposit-coin-name {
    font-size: 15px; 
    font-weight: 700;
    color: rgba(255, 255, 255, 0.98);
    font-family: pp-neue-machina-plain-regular, sans-serif;
}

.panel-deposit-coin-main {
    display: flex;
    align-items: center;
    padding-top: 4px;
}

.panel-deposit-coin-rate-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.65);
    font-family: neue-haas-grot-text-roman, sans-serif;
}

.panel-deposit-coin-rate-left {
    color: rgba(255, 255, 255, 0.85);
}

/* Round arrow: empty inside, white stroke */
.panel-deposit-rate-arrow {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: #fff;
}

.panel-deposit-coin-rate-value {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

@media (max-width: 999px) {
    .panel-deposit-coin-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        justify-content: center;
    }
    .panel-deposit-coin-name {
        font-size: 11.5px;
    }
}

@media (min-width: 1000px) {
    .panel-deposit-coin-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Detail block: index-style glass card */
.panel-deposit-detail-wrap {
    margin-top: 24px;
}
.panel-deposit-detail-box {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    padding: 24px;
    box-sizing: border-box;
}

.panel-deposit-detail-coin {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.panel-deposit-detail-coin .panel-deposit-coin-logo {
    width: 32px;
    height: 32px;
}
.panel-deposit-detail-coin-name {
    font-size: 17px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.98);
}

.panel-deposit-detail-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 8px;
}

.panel-deposit-network-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}
.panel-deposit-network-btn {
    padding: 10px 18px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.panel-deposit-network-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
}
.panel-deposit-network-btn.is-selected {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.35);
}

/* Rate block: no padding on box so separator runs full height; one row on all screens */
.panel-deposit-rate-box {
    margin-bottom: 16px;
    min-height: 35px;
    padding: 0;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: stretch; 
}
.panel-deposit-rate-center {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
    padding: 10px 12px;
}
.panel-deposit-rate-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}
.panel-deposit-rate-left {
    color: rgba(255, 255, 255, 0.95);
}
.panel-deposit-rate-wrap .panel-deposit-rate-arrow {
    width: 16px;
    height: 16px;
}
.panel-deposit-rate-right {
    color: rgba(255, 255, 255, 0.95);
}
/* Timer at right edge, full-height left border as separator */
.panel-deposit-rate-timer {
    display: flex;
    align-items: center;
    padding: 0 16px;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 15px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: rgba(255, 255, 255, 0.95);
    flex-shrink: 0;
}

.panel-deposit-rate-disclaimer-box {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
}
.panel-deposit-rate-disclaimer {
    margin: 0;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.35;
}

.panel-deposit-address-row {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin-bottom: 16px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.25);
}
.panel-deposit-address-value {
    flex: 1;
    min-width: 0;
    padding: 14px 16px;
    font-size: 13px;
    font-family: ui-monospace, monospace;
    color: rgba(255, 255, 255, 0.92);
    word-break: break-all;
    background: none;
    border: none;
}
.panel-deposit-address-value[type="text"] {
    width: 100%;
    box-sizing: border-box;
}
.panel-deposit-address-value::placeholder {
    color: rgba(255, 255, 255, 0.4);
}
.panel-deposit-copy-min-wrap {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    flex-shrink: 0;
}
.panel-deposit-copy-btn {
    padding: 14px 18px;
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.panel-deposit-copy-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}
.panel-deposit-copy-btn:disabled {
    cursor: default;
    opacity: 0.9;
}
.panel-deposit-copy-text,
.panel-deposit-copied-text {
    display: inline;
}

.panel-deposit-min-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    width: auto;
}
.panel-deposit-min-box .panel-deposit-detail-label {
    margin-bottom: 0;
}
.panel-deposit-min-value {
    font-size: 15px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
}


/* ---- Deposit: History (box-style row, hash link on PC) ---- */
.panel-deposit-history {
    margin-top: 24px;
}
.panel-deposit-history-box {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    padding: 20px;
    box-sizing: border-box;
}
.panel-deposit-history-title {
    font-size: 18px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.98);
    font-family: pp-neue-machina-plain-regular, sans-serif;
    margin: 0 0 16px 0;
    text-align: center;
}
.panel-deposit-history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.panel-deposit-history-row {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    font-family: neue-haas-grot-text-roman, sans-serif;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.panel-deposit-history-row:hover {
    background: rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.18);
}
.panel-deposit-history-row-left {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.2);
}
.panel-deposit-history-row-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    padding: 12px 16px;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.panel-withdraw-history-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-right: 8px;
}

.panel-withdraw-history-status-icon {
    width: 18px;
    height: 18px;
    display: block;
}

.panel-withdraw-history-status-spinner {
    animation: panel-withdraw-status-spin 1s linear infinite;
    transform-origin: center;
}

@keyframes panel-withdraw-status-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}
.panel-deposit-history-gft {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    margin-left: 4px;
}
.panel-deposit-history-arrow {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: inherit;
}
.panel-deposit-history-logo {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    border-radius: 100%;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.panel-deposit-history-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 100%;
}
.panel-deposit-history-amount {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.98);
}
.panel-deposit-history-symbol {
    color: rgba(255, 255, 255, 0.75);
}
.panel-deposit-history-network {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
}
.panel-deposit-history-hash {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    font-family: ui-monospace, monospace;
    text-decoration: none;
    margin-left: 4px;
}
.panel-deposit-history-hash:hover {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: underline;
}
.panel-deposit-history-time {
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
    white-space: nowrap;
}
.panel-deposit-history-load-more-wrap {
    margin-top: 12px;
    text-align: center;
}
.panel-deposit-history-load-more {
    padding: 8px 20px;
    font-size: 14px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    color: #fff;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}
.panel-load-more-btn {
    padding: 8px 20px;
    font-size: 14px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    color: #fff;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}
.panel-load-more-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.18);
}
.panel-load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.panel-deposit-history-load-more:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.18);
}
.panel-deposit-history-load-more:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.panel-deposit-history-status {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px; 
    margin-left: auto;
    margin-right: auto;
    max-width: 300px;
    text-align: center; 
    padding: 8px 4px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    transition: opacity 0.18s ease, transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.list-row-enter {
    animation: list-row-enter-anim 0.38s ease both;
}

.list-row-exit {
    animation: list-row-exit-anim 0.28s ease both;
    pointer-events: none;
}

@keyframes list-row-enter-anim {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes list-row-exit-anim {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(8px); }
}
@media (max-width: 999px) {
    .panel-deposit-history-title {
        font-size: 16px;
    }
    .panel-deposit-history-row {
        font-size: 13px;
    }
    .panel-deposit-history-amount {
        font-size: 13px;
    }
    .panel-deposit-history-time {
        font-size: 12px;
    }
    .panel-deposit-history-gft {
        display: none;
    }
    .panel-deposit-history-symbol {
        display: none;
    }
    .panel-deposit-history-network {
        display: none;
    }
    .panel-deposit-history-hash {
        display: none;
    }

    .panel-withdraw-history-status {
        width: 20px;
        height: 20px;
        margin-right: 10px;
    }

    .panel-withdraw-history-status-icon {
        width: 20px;
        height: 20px;
    }
}

/* Investments: stake history (1:1 deposit/withdraw style, own classes) */
.panel-investments-history {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.panel-investments-history-staked-box {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.3);
    padding: 24px 20px;
}
.panel-investments-history-staked-box .panel-investments-history-staked-label,
.panel-investments-history-staked-box .panel-profile-overview-label--staked {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 0 0;
}
.panel-investments-history-staked-balance {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.panel-investments-history-staked-balance .panel-sidebar-wallet-balance-value {
    font-size: 18px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.98);
    font-family: pp-neue-machina-plain-regular, neue-haas-grot-text-roman, sans-serif;
}
.panel-investments-history-staked-balance .panel-sidebar-wallet-balance-usd {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
    font-family: neue-haas-grot-text-roman, sans-serif;
}
.panel-investments-history-box {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    padding: 20px;
    box-sizing: border-box;
}
.panel-investments-history-title {
    font-size: 18px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.98);
    font-family: pp-neue-machina-plain-regular, sans-serif;
    margin: 0 0 16px 0;
}
.panel-investments-history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.panel-investments-history-row {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    font-family: neue-haas-grot-text-roman, sans-serif;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.25);
    cursor: default;
    transition: background 0.2s, border-color 0.2s;
}
.panel-investments-history-row:hover {
    background: rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.18);
}
.panel-investments-history-row-left {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.2);
}
.panel-investments-history-row-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    padding: 12px 16px;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}
.panel-investments-history-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-right: 8px;
}
.panel-investments-history-status-icon {
    width: 18px;
    height: 18px;
    display: block;
}
.panel-investments-history-status-spinner {
    animation: panel-investments-status-spin 1s linear infinite;
    transform-origin: center;
}
@keyframes panel-investments-status-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.panel-investments-history-amount {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.98);
}
.panel-investments-history-symbol {
    color: rgba(255, 255, 255, 0.75);
}
.panel-investments-history-time {
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
    white-space: nowrap;
}
@media (max-width: 999px) {
    .panel-investments-history-title {
        font-size: 16px;
    }
    .panel-investments-history-row {
        font-size: 13px;
    }
    .panel-investments-history-amount {
        font-size: 13px;
    }
    .panel-investments-history-time {
        font-size: 12px;
    }
    .panel-investments-history-status {
        width: 20px;
        height: 20px;
        margin-right: 10px;
    }
    .panel-investments-history-status-icon {
        width: 20px;
        height: 20px;
    }
}
.panel-investments-history-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.panel-investments-history-head .panel-investments-history-title {
    margin: 0;
}
.panel-investments-history-regen {
    padding: 6px 14px;
    font-size: 13px;
    font-family: neue-haas-grot-text-roman, sans-serif;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.panel-investments-history-regen:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.3);
}
.panel-investments-history-dates {
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}
.panel-investments-history-date-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
}
/* pending/failed/active/cancelled: start white, end gray */
.panel-investments-history-dates.is-pending .panel-investments-history-date-row:first-child .panel-investments-history-time,
.panel-investments-history-dates.is-failed .panel-investments-history-date-row:first-child .panel-investments-history-time,
.panel-investments-history-dates.is-active .panel-investments-history-date-row:first-child .panel-investments-history-time,
.panel-investments-history-dates.is-cancelled .panel-investments-history-date-row:first-child .panel-investments-history-time {
    color: rgba(255, 255, 255, 0.98);
}
.panel-investments-history-dates.is-pending .panel-investments-history-date-row:last-child .panel-investments-history-time,
.panel-investments-history-dates.is-failed .panel-investments-history-date-row:last-child .panel-investments-history-time,
.panel-investments-history-dates.is-active .panel-investments-history-date-row:last-child .panel-investments-history-time,
.panel-investments-history-dates.is-cancelled .panel-investments-history-date-row:last-child .panel-investments-history-time {
    color: rgba(255, 255, 255, 0.6);
}
/* success: start gray, end white */
.panel-investments-history-dates.is-success .panel-investments-history-date-row:first-child .panel-investments-history-time {
    color: rgba(255, 255, 255, 0.6);
}
.panel-investments-history-dates.is-success .panel-investments-history-date-row:last-child .panel-investments-history-time {
    color: rgba(255, 255, 255, 0.98);
}
/* Panel modal — generic full-page overlay and window (source of truth) */
.panel-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    transition: opacity 0.35s ease, visibility 0s linear 0.35s;
    box-sizing: border-box;
}
.panel-modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.35s ease, visibility 0s;
}
.panel-modal {
    position: relative;
    max-width: 440px;
    width: 90%;
    margin: auto;
    min-height: min-content;
    overflow: hidden;
    flex-shrink: 0;
    /* Единый кап для всех панель-модалок: 750 px либо 90vh — что меньше. Внутри scroll. */
    max-height: min(750px, 90vh);
    padding: 20px 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}
.panel-modal-inner {
    position: relative;
    padding: 28px 24px;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
    max-height: min(750px, 90vh);
    overflow: hidden;
}
.panel-modal-body,
.panel-modal-body-scroll {
    flex: 1;
    min-height: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}
/* Пока нет переполнения — без полосы; с классом --scrollable — стабильный трек (см. panel-modal.js) */
.panel-modal-body-scroll {
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.panel-modal-body-scroll.panel-modal-body-scroll--scrollable {
    overflow-y: scroll;
    scrollbar-gutter: stable;
    padding-inline-end: 5px;
    scrollbar-width: thin;
    scrollbar-color: rgba(149, 85, 233, 0.75) rgba(149, 85, 233, 0.12);
}
.panel-modal-body-scroll.panel-modal-body-scroll--scrollable::-webkit-scrollbar {
    width: 8px;
}
.panel-modal-body-scroll.panel-modal-body-scroll--scrollable::-webkit-scrollbar-track {
    background: rgba(149, 85, 233, 0.1);
    border-radius: 4px;
}
.panel-modal-body-scroll.panel-modal-body-scroll--scrollable::-webkit-scrollbar-thumb {
    background: rgba(149, 85, 233, 0.55);
    border-radius: 4px;
    min-height: 36px;
}
.panel-modal-body-scroll.panel-modal-body-scroll--scrollable::-webkit-scrollbar-thumb:hover {
    background: rgba(149, 85, 233, 0.75);
}

.panel-modal-body-scroll.panel-modal-body-scroll--scrollable::-webkit-scrollbar-button,
.panel-modal-body-scroll.panel-modal-body-scroll--scrollable::-webkit-scrollbar-button:vertical:start,
.panel-modal-body-scroll.panel-modal-body-scroll--scrollable::-webkit-scrollbar-button:vertical:end {
    display: block;
    width: 0;
    height: 0;
    min-width: 0;
    min-height: 0;
}

/* Копия .admin-user-detail-close и :hover из admin/index.css — крестик закрытия модалки */
.panel-detail-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    color: #000;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.panel-detail-close:hover {
    background: #e0e0e0;
}
 
.panel-modal-title {
    font-family: pp-neue-machina-plain-regular, sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 20px 0;
    flex-shrink: 0;
}

.panel-modal-inner > .panel-modal-body:last-of-type,
.panel-modal-inner > .panel-modal-body-scroll:last-of-type {
    margin-bottom: 0;
}
.panel-modal-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}
.panel-modal-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-family: neue-haas-grot-text-roman, sans-serif;
}
.panel-modal-value {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.95);
    font-family: neue-haas-grot-text-roman, sans-serif;
    word-break: break-all;
}
.panel-modal-close {
    display: block;
    width: 100%;
    padding: 12px 24px;
    font-family: pp-neue-machina-plain-regular, sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--panel-text-inverse);
    background: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.2s;
    flex-shrink: 0;
}
.panel-modal-close:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}
.panel-modal-close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.panel-modal-close.panel-modal-close--success,
.panel-modal-close.panel-modal-close--danger,
.panel-modal-close.panel-modal-close--warning {
    background: transparent;
    border: 2px solid currentColor;
    color: #ffffff;
}

.panel-modal-close.panel-modal-close--success {
    color: #43a047;
    border-color: #43a047;
}

.panel-modal-close.panel-modal-close--danger {
    color: #dc2626;
    border-color: #dc2626;
}

.panel-modal-close.panel-modal-close--warning {
    color: #d4a106;
    border-color: #d4a106;
}

.panel-modal-close.panel-modal-close--success:hover {
    background: #43a047;
    border-color: #43a047;
    color: #ffffff;
}

.panel-modal-close.panel-modal-close--danger:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #ffffff;
}

.panel-modal-close.panel-modal-close--warning:hover {
    background: #d4a106;
    border-color: #d4a106;
    color: #ffffff;
}

.panel-modal-close.panel-modal-close--success:focus-visible {
    outline: 2px solid rgba(67, 160, 71, 0.85);
    outline-offset: 2px;
}

.panel-modal-close.panel-modal-close--danger:focus-visible {
    outline: 2px solid rgba(220, 38, 38, 0.85);
    outline-offset: 2px;
}

.panel-modal-close.panel-modal-close--warning:focus-visible {
    outline: 2px solid rgba(212, 161, 6, 0.85);
    outline-offset: 2px;
}
.panel-modal-cancel-wrap,
.panel-modal-close {
    margin-top: 16px;
}
.panel-modal-cancel-wrap {
    margin-bottom: 0;
    flex-shrink: 0;
}
.panel-modal-cancel-btn {
    display: block;
    width: 100%;
    padding: 12px 24px;
    font-family: pp-neue-machina-plain-regular, sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.panel-modal-cancel-btn:hover {
    background: #ffffff;
    border-color: #ffffff;
    color: #000000;
}
.panel-modal-cancel-btn:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.95);
    outline-offset: 2px;
}

/* Secondary CTA (e.g. rigs purchase success — not “destructive cancel”): solid violet, white label, same on hover/active */
.panel-modal-cancel-btn.panel-modal-cta-btn--primary {
    color: #ffffff;
    background: rgba(124, 58, 237, 0.92);
    border-color: rgba(139, 92, 246, 0.95);
}
.panel-modal-cancel-btn.panel-modal-cta-btn--primary:hover,
.panel-modal-cancel-btn.panel-modal-cta-btn--primary:active {
    color: #ffffff;
    background: rgba(124, 58, 237, 0.92);
    border-color: rgba(139, 92, 246, 0.95);
}
.panel-modal-cancel-btn.panel-modal-cta-btn--primary:focus-visible {
    outline: 2px solid rgba(167, 139, 250, 0.95);
    outline-offset: 2px;
    color: #ffffff;
    background: rgba(124, 58, 237, 0.92);
    border-color: rgba(139, 92, 246, 0.95);
}

/* Aliases: deposit-tx / stake-detail use same modal styles */
.panel-deposit-tx-overlay,
.panel-stake-detail-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    transition: opacity 0.35s ease, visibility 0s linear 0.35s;
    box-sizing: border-box;
}
.panel-deposit-tx-overlay.is-open,
.panel-stake-detail-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.35s ease, visibility 0s;
}
.panel-deposit-tx-modal,
.panel-stake-detail-modal {
    position: relative;
    max-width: 440px;
    width: 90%;
    margin: auto;
    min-height: min-content;
    overflow: hidden;
    flex-shrink: 0;
    max-height: min(750px, 90vh);
    padding: 20px 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}
.panel-deposit-tx-modal-inner,
.panel-stake-detail-modal-inner {
    padding: 28px 24px;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
    max-height: min(750px, 90vh);
    overflow: hidden;
}
.panel-deposit-tx-modal-title,
.panel-stake-detail-modal-title {
    font-family: pp-neue-machina-plain-regular, sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 20px 0;
    flex-shrink: 0;
}
.panel-deposit-tx-modal-body,
.panel-stake-detail-modal-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}
.panel-deposit-tx-field,
.panel-stake-detail-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.panel-deposit-tx-field.panel-deposit-tx-amount-equiv
{
    flex-direction: row;   
}

.panel-deposit-tx-label,
.panel-stake-detail-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.95);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-family: neue-haas-grot-text-roman, sans-serif;
}
.panel-deposit-tx-value,
.panel-stake-detail-value {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.95);
    font-family: neue-haas-grot-text-roman, sans-serif;
    word-break: break-all;
}
.panel-deposit-tx-modal-close,
.panel-stake-detail-modal-close {
    display: block;
    width: 100%;
    padding: 12px 24px;
    font-family: pp-neue-machina-plain-regular, sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--panel-text-inverse);
    background: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}
.panel-deposit-tx-modal-close:hover,
.panel-stake-detail-modal-close:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}
.panel-deposit-tx-modal-close:focus-visible,
.panel-stake-detail-modal-close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Deposit/withdraw-specific: coin row, status, hash link (inside modal body) */
.panel-deposit-tx-field-coin .panel-deposit-tx-value,
.panel-deposit-tx-field-coin .panel-modal-value {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.panel-deposit-tx-field-status .panel-deposit-tx-value,
.panel-deposit-tx-field-status .panel-modal-value {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.panel-deposit-tx-field.panel-deposit-tx-amount-equiv .panel-deposit-tx-value,
.panel-deposit-tx-field.panel-deposit-tx-amount-equiv .panel-modal-value {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
}
.panel-deposit-tx-field.panel-deposit-tx-rate .panel-deposit-tx-label,
.panel-deposit-tx-field.panel-deposit-tx-rate .panel-modal-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.65);
    text-transform: none;
}
.panel-deposit-tx-modal-logo {
    width: 28px;
    height: 28px;
}
.panel-deposit-tx-modal-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 100%;
}
.panel-deposit-tx-status-val .panel-withdraw-history-status-icon {
    width: 20px;
    height: 20px;
}
.panel-deposit-tx-hash-link {
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    font-family: ui-monospace, monospace;
    word-break: break-all;
}
.panel-deposit-tx-hash-link:hover {
    color: #fff;
    text-decoration: underline;
}

.panel-index-section--referral .panel-referral-inner {
    height: auto;
    min-height: auto;
}

.panel-referral-inner {
    padding: 24px 20px 64px;
    box-sizing: border-box;
}

.panel-referral-code-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 300px;
    margin: 0 auto 24px;
    padding: 12px 20px;
    border-radius: 12px;
    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;
}

.panel-referral-code-btn:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--panel-text-inverse);
}

.panel-referral-code-btn:active {
    background: rgba(255, 255, 255, 0.9);
}

.panel-referral-code-btn-icon {
    flex-shrink: 0;
    stroke: currentColor;
}

.panel-referral-code-btn-text {
    flex: 1;
    text-align: center;
}

.panel-referral-code-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.panel-referral-code-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.35s ease, visibility 0s;
}

.panel-referral-code-modal {
    position: relative;
    max-width: 440px;
    width: 90%;
    padding: 28px 24px;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    /* Единый кап + скролл — как в админ-модалках. */
    max-height: min(750px, 90vh);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

.panel-referral-code-modal-title {
    font-family: pp-neue-machina-plain-regular, sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 20px 0;
    text-align: center;
}

.panel-referral-code-modal-body {
    margin-bottom: 20px;
}

.panel-referral-code-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.panel-referral-code-field + .panel-referral-code-field {
    margin-top: 12px;
}

.panel-referral-code-label {
    font-family: pp-neue-machina-plain-regular, sans-serif;
    font-weight: 600;
    font-size: 12px;
    opacity: 0.9;
    color: rgba(255, 255, 255, 0.9);
}

.panel-referral-code-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-referral-code-input {
    flex: 1;
    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;
    cursor: default;
}

.panel-referral-code-copy-btn {
    height: 46px;
    width: 46px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(0, 0, 0, 0.35);
    color: var(--color-text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.panel-referral-code-copy-btn:hover {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.35);
}

.panel-referral-code-copy-btn:active {
    background: rgba(0, 0, 0, 0.6);
}

.panel-referral-code-copy-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.panel-referral-code-modal-close {
    display: block;
    width: 100%;
    padding: 12px 24px;
    font-family: pp-neue-machina-plain-regular, sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--panel-text-inverse);
    background: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.panel-referral-code-modal-close:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

.panel-referral-code-modal-close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.panel-referral-stats {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    padding: 20px;
    box-sizing: border-box;
    margin-bottom: 20px;
}
#referral-stats-root > .panel-referral-stats:last-child {
    margin-bottom: 0;
}

.panel-referral-stats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

@media (min-width: 1000px) {
    .panel-referral-stats-grid {
        /* 3 колонки: чтобы примерно повторить grid, делаем ширину элементов из расчёта на контейнер. */
    }

    .panel-referral-stats-grid > .panel-referral-stat-box {
        flex: 0 1 calc((100% - 28px) / 3);
    }
}

.panel-referral-stat-value, .panel-referral-level-value,.panel-referral-stat-num{
    text-decoration: none !important;
}

@media (max-width: 999px) {
    .panel-referral-stats-grid {
        /* Авто-сборка рядов — размеры элементов задаём через flex-basis. */
    }

    .panel-referral-stats-grid > .panel-referral-stat-box {
        flex: 1 1 100px;
    }

    .panel-referral-stat-label {
        font-size: 9px;
    }
    .panel-referral-stat-value {
        font-size: 14px;
    }
}

.panel-referral-stats-grid > .panel-referral-stat-box {
    /* Базовое поведение (как было minmax(140px, 1fr) в grid): */
    flex: 1 1 140px;
}

@media (max-width: 380px) {
    .panel-referral-stat-label {
        font-size: 8px;
    }
    .panel-referral-stat-value {
        font-size: 12px;
    }
}

.panel-referral-stat-box {
    min-width: 98px;
    min-height: 58px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform 0.2s;
}

.panel-referral-stat-box:active {
    transform: translateY(-3px);
}

.panel-referral-stat-box:hover {
    transform: translateY(-3px);
}

.panel-referral-stat-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.55);
    font-family: neue-haas-grot-text-roman, sans-serif;
    line-height: 1.3;
}

.panel-referral-stat-value {
    font-size: 15px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.98);
    font-family: pp-neue-machina-plain-regular, sans-serif;
    letter-spacing: 0.02em;
}

.panel-referral-stat-num,
.panel-referral-stat-suffix,
.panel-referral-stat-tail {
    display: inline;
    margin: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    letter-spacing: inherit;
}

.panel-referral-stat-suffix {
    margin-left: 2px;
    opacity: 0.85;
}

.panel-referral-stat-box--clickable {
    cursor: pointer;
}

.panel-referral-stat-box--clickable .panel-referral-stat-label,
.panel-referral-stat-box--clickable .panel-referral-stat-num {
    text-decoration: underline dotted rgba(255, 255, 255, 0.35);
    text-underline-offset: 3px;
}

.panel-referral-stat-box--clickable:hover {
    background: rgba(255, 255, 255, 0.08);
}

.panel-referral-stat-box--clickable:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.4);
    outline-offset: 2px;
}

.ref-info-body {
    line-height: 1.5;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.ref-info-body b {
    color: #fff;
}

.ref-info-body i {
    font-style: italic;
    color: rgba(255, 255, 255, 0.85);
}

.panel-referral-stats-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
}

.panel-referral-stats-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
    font-family: neue-haas-grot-text-roman, sans-serif;
}

.panel-referral-stats-value {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    font-family: pp-neue-machina-plain-regular, sans-serif;
}

.panel-referral-earn-chart {
    margin-bottom: 20px;
}

.panel-referral-chart-box {
    max-height: 450px;
}

.panel-referral-box {
    margin-top: 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    padding: 20px;
    box-sizing: border-box;
}

.panel-referral-title {
    font-family: pp-neue-machina-plain-regular, sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 20px 0;
    text-align: center;
}
.panel-referral-level-box {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 20px auto;
    padding: 20px 32px;
    min-width: 98px;
    min-height: 58px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    max-width: 280px;
    box-sizing: border-box;
    transition: transform 0.2s ease, background 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}
.panel-referral-level-box:hover {
    transform: translateY(-3px);
}
.panel-referral-level-box:active {
    transform: translateY(-3px);
}
.panel-referral-level-box--clickable {
    cursor: pointer;
}
.panel-referral-level-box--clickable .panel-referral-level-label,
.panel-referral-level-box--clickable .panel-referral-level-value {
    text-decoration: underline dotted rgba(255, 255, 255, 0.35);
    text-underline-offset: 3px;
}
.panel-referral-level-box--clickable:hover {
    background: rgba(255, 255, 255, 0.10);
}
.panel-referral-level-box--clickable:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.4);
    outline-offset: 2px;
}
.panel-referral-level-box::before {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 13px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    filter: blur(8px);
    z-index: -1;
}
.panel-referral-level-box[data-level="1"]::before {
    opacity: 0.08;
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.3), rgba(0, 191, 255, 0.2));
}
.panel-referral-level-box[data-level="2"]::before {
    opacity: 0.1;
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.35), rgba(0, 191, 255, 0.25));
    filter: blur(10px);
}
.panel-referral-level-box[data-level="3"]::before {
    opacity: 0.12;
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.4), rgba(0, 191, 255, 0.3));
    filter: blur(12px);
}
.panel-referral-level-box[data-level="4"]::before {
    opacity: 0.15;
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.45), rgba(0, 191, 255, 0.35));
    filter: blur(14px);
}
.panel-referral-level-box[data-level="5"]::before {
    opacity: 0.2;
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.5), rgba(0, 191, 255, 0.4));
    filter: blur(16px);
}
.panel-referral-level-box[data-level="1"] {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
}
.panel-referral-level-box[data-level="2"] {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
}
.panel-referral-level-box[data-level="3"] {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
}
.panel-referral-level-box[data-level="4"] {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
}
.panel-referral-level-box[data-level="5"] {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.06);
}
.panel-referral-level-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.55);
    font-family: neue-haas-grot-text-roman, sans-serif;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.panel-referral-level-value {
    font-size: 36px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.98);
    font-family: pp-neue-machina-plain-regular, sans-serif;
    line-height: 1;
    transition: color 0.3s ease, text-shadow 0.3s ease, transform 0.3s ease;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.85));
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
    transform: scale(1);
}
.panel-referral-level-box[data-level="1"] .panel-referral-level-value {
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.85));
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
    transform: scale(1);
}
.panel-referral-level-box[data-level="2"] .panel-referral-level-value {
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.85));
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
    transform: scale(1.05);
}
.panel-referral-level-box[data-level="3"] .panel-referral-level-value {
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.85));
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
    transform: scale(1.1);
}
.panel-referral-level-box[data-level="4"] .panel-referral-level-value {
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.85));
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
    transform: scale(1.15);
}
.panel-referral-level-box[data-level="5"] .panel-referral-level-value {
    background-size: 200% 200%;
    background-image: linear-gradient(135deg, rgba(138, 43, 226, 1), rgba(0, 191, 255, 1), rgba(138, 43, 226, 1));
    animation: panel-referral-level-gradient 3s ease infinite;
    filter: drop-shadow(0 0 30px rgba(138, 43, 226, 1)) drop-shadow(0 0 18px rgba(0, 191, 255, 0.8)) drop-shadow(0 0 10px rgba(255, 255, 255, 0.4));
    transform: scale(1.2);
}
@keyframes panel-referral-level-gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.panel-referral-table-wrap {
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 92, 246, 0.85) rgba(0, 0, 0, 0.4);
}
.panel-referral-table-wrap::-webkit-scrollbar {
    height: 10px;
}
.panel-referral-table-wrap::-webkit-scrollbar-button,
.panel-referral-table-wrap::-webkit-scrollbar-button:horizontal:start,
.panel-referral-table-wrap::-webkit-scrollbar-button:horizontal:end {
    display: block;
    width: 0;
    height: 0;
    min-width: 0;
    min-height: 0;
}
.panel-referral-table-wrap::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 5px;
}
.panel-referral-table-wrap::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.85);
    border-radius: 5px;
    min-width: 40px;
}
.panel-referral-table-wrap::-webkit-scrollbar-thumb:hover {
    background: rgba(167, 139, 250, 0.95);
}
.panel-referral-table-wrap::-webkit-scrollbar-thumb:active {
    background: rgba(196, 181, 253, 1);
}
.panel-referral-table-wrap::-webkit-scrollbar-track:hover {
    background: rgba(0, 0, 0, 0.5);
}

.panel-referral-table {
    width: max-content;
    min-width: 720px;
    table-layout: auto;
    border-collapse: collapse;
    overflow: visible;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    border: none;
}

.panel-referral-table th,
.panel-referral-table td {
    padding: 6px 8px;
    text-align: center;
    vertical-align: middle;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.panel-referral-table th:first-child,
.panel-referral-table td:first-child {
    border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.panel-referral-table th:last-child,
.panel-referral-table td:last-child {
    border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.panel-referral-table thead tr:first-child th {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.panel-referral-table th {
    font-family: pp-neue-machina-plain-regular, sans-serif;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.04);
    white-space: normal;
    line-height: 1.3;
    max-width: 100px;
}

.panel-referral-table th.ref-th-contact-fee {
    max-width: 90px;
}

.panel-referral-table td {
    font-family: neue-haas-grot-text-roman, sans-serif;
    white-space: nowrap;
    min-width: max-content;
}

.panel-referral-table .ref-req-cell {
    color: rgba(255, 255, 255, 0.7);
}

.panel-referral-table .ref-req-cell.empty {
    color: rgba(255, 255, 255, 0.35);
    font-style: italic;
}

.panel-referral-table .ref-level-num {
    font-family: pp-neue-machina-plain-regular, sans-serif;
    font-weight: 700;
    color: #fff;
}

.panel-referral-table .ref-th-has-tooltip,
.panel-referral-table .ref-th-label-only {
    position: relative;
    cursor: pointer;
    font-size: 11px;
}

.panel-referral-table .ref-th-unit {
    margin: 2px 0 0;
    font-size: 10px;
    line-height: 1.2;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.55);
    text-align: center;
}

.panel-referral-table .ref-th-has-tooltip {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 4px;
    transition: background 0.15s ease;
}

.panel-referral-table .ref-th-has-tooltip:hover {
    background: rgba(255, 255, 255, 0.10);
}

.panel-referral-table tbody td[data-tw-info-title] {
    cursor: pointer;
    transition: background 0.15s ease;
}

.panel-referral-table tbody td[data-tw-info-title]:hover {
    background: rgba(255, 255, 255, 0.08);
}

.panel-referral-table tbody td.ref-cell-active[data-tw-info-title]:hover {
    background: rgba(255, 255, 255, 1);
}

.panel-referral-table .ref-tooltip-bubble {
    display: none !important;
    position: absolute;
    left: 50%;
    top: 100%;
    margin-top: 4px;
    padding: 8px 10px;
    max-width: 340px;
    min-width: 0;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    color: #111;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateX(-50%);
    white-space: normal;
    word-wrap: break-word;
    box-sizing: border-box;
}
 
.panel-referral-table .ref-th-tooltip-first .ref-tooltip-bubble {
    left: 0;
    transform: none;
}
 
.panel-referral-table .ref-th-tooltip-last .ref-tooltip-bubble {
    left: auto;
    right: 0;
    transform: none;
}

.panel-referral-table .ref-th-has-tooltip:hover .ref-tooltip-bubble,
.panel-referral-table .ref-th-has-tooltip.is-pinned .ref-tooltip-bubble {
    opacity: 1;
}

.panel-referral-table .ref-empty-icon {
    display: inline-flex;
    width: 14px;
    height: 14px;
    color: rgba(255, 255, 255, 0.35);
    vertical-align: middle;
}

.panel-referral-table .ref-sub-ref-cell {
    padding: 0;
    vertical-align: middle;
}

.panel-referral-table .ref-see-btn {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 2.5em;
    padding: 6px 8px;
    margin: 0;
    border: none;
    border-radius: 0;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600; 
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    box-sizing: border-box;
}

.panel-referral-table .ref-see-btn span {
    color: #fff;
    visibility: visible;
}

.panel-referral-table tbody td.ref-cell-active .ref-see-btn span {
    color: #111;
}

.panel-referral-table tbody td.ref-cell-active {
    background: rgba(255, 255, 255, 0.92);
    color: #111;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    border-right: 1px solid rgba(0, 0, 0, 0.05);
}

.panel-referral-table tbody td.ref-cell-active:last-child {
    border-right: none;
}

.panel-referral-table tbody td.ref-cell-active .ref-level-num,
.panel-referral-table tbody td.ref-cell-active .ref-req-cell,
.panel-referral-table tbody td.ref-cell-active .ref-req-cell.empty,
.panel-referral-table tbody td.ref-cell-active .ref-empty-icon {
    color: #111;
}

.panel-referral-table tbody td.ref-cell-active .ref-see-btn {
    background: rgba(255, 255, 255, 0.4);
    color: #111;
}

.ref-deap-fee-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}

.ref-deap-fee-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.35s ease, visibility 0s;
}

.ref-deap-fee-modal {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 560px;
    width: 94%;
    /* Единый кап для всех панель-модалок. Внутренний table-wrap уже скроллится. */
    max-height: min(750px, 90vh);
    padding: 32px 28px;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.ref-deap-fee-modal-title {
    font-family: pp-neue-machina-plain-regular, sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    flex-shrink: 0;
}

.ref-deap-fee-table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    margin-bottom: 0;
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.ref-deap-fee-hint-card {
    margin: 4px 0 16px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    line-height: 1.5;
    text-align: left;
}

.ref-deap-fee-hint-card b {
    color: #fff;
}

.ref-deap-fee-hint-card i {
    font-style: italic;
    color: rgba(255, 255, 255, 0.85);
}

.ref-deap-fee-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.ref-deap-fee-table thead,
.ref-deap-fee-table th {
    overflow: visible;
}

.ref-deap-fee-table th,
.ref-deap-fee-table td {
    padding: 8px 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.ref-deap-fee-table th {
    font-weight: 600;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.ref-deap-fee-th-has-tooltip {
    position: relative;
    cursor: pointer;
}

.ref-deap-fee-tooltip-bubble {
    display: none !important;
    position: absolute;
    left: 50%;
    top: 100%;
    margin-top: 4px;
    padding: 8px 10px;
    max-width: 280px;
    min-width: 0;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    color: #111;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateX(-50%);
    white-space: normal;
    word-wrap: break-word;
    box-sizing: border-box;
}

.ref-deap-fee-th-has-tooltip.ref-deap-fee-th-tooltip-first .ref-deap-fee-tooltip-bubble {
    left: 0;
    transform: none;
}

.ref-deap-fee-th-has-tooltip.ref-deap-fee-th-tooltip-last .ref-deap-fee-tooltip-bubble {
    left: auto;
    right: 0;
    transform: none;
}

.ref-deap-fee-th-has-tooltip:hover .ref-deap-fee-tooltip-bubble,
.ref-deap-fee-th-has-tooltip.is-pinned .ref-deap-fee-tooltip-bubble {
    opacity: 1;
}

.ref-deap-fee-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    flex-shrink: 0;
}

/* Телефон: скролл на overlay — модалка не обрезается по вертикали */
@media (max-width: 640px) {
    .ref-deap-fee-overlay {
        padding: 12px;
        align-items: center;
        justify-content: center;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .ref-deap-fee-modal {
        max-height: none;
        width: 96%;
        padding: 24px 18px;
        gap: 16px;
        overflow: visible;
    }

    .ref-deap-fee-modal .ref-deap-fee-table-wrap {
        overflow-y: visible;
        overflow-x: auto;
    }

    .ref-deap-fee-modal-title {
        font-size: 20px;
    }

    .ref-deap-fee-hint-card {
        padding: 10px 12px;
        font-size: 12px;
    }
}

/* Низкий экран: скролл на overlay — вся модалка доступна */
@media (max-height: 749px) {
    .ref-deap-fee-overlay {
        padding: 12px;
        align-items: center;
        justify-content: center;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .ref-deap-fee-modal {
        max-height: none;
        padding: 20px 18px;
        gap: 14px;
        width: min(560px, 96%);
        overflow: visible;
    }

    .ref-deap-fee-modal .ref-deap-fee-table-wrap {
        overflow-y: visible;
        overflow-x: auto;
        flex: 0 1 auto;
        min-height: 0;
    }

    .ref-deap-fee-modal-title {
        font-size: 19px;
    }

    .ref-deap-fee-hint-card {
        margin: 2px 0 10px;
        padding: 10px 12px;
        font-size: 12px;
    }

    .ref-deap-fee-table th,
    .ref-deap-fee-table td {
        padding: 6px 8px;
        font-size: 13px;
    }

    .ref-deap-fee-ok {
        padding: 10px 28px;
        font-size: 15px;
    }
}

.ref-deap-fee-ok {
    display: inline-block;
    padding: 12px 32px;
    font-family: pp-neue-machina-plain-regular, sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--panel-text-inverse);
    background-color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.ref-deap-fee-ok:hover {
    transform: translateY(-3px);
}

.ref-deap-fee-ok:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.panel-to-main-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}

.panel-to-main-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.35s ease, visibility 0s;
}

.panel-to-main-modal {
    position: relative;
    max-width: 480px;
    width: 90%;
    padding: 32px 28px;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    max-height: min(750px, 90vh);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

.panel-to-main-modal-title {
    font-family: pp-neue-machina-plain-regular, sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 16px 0;
}

.panel-to-main-modal-text {
    font-family: neue-haas-grot-text-roman, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 24px 0;
}

.panel-to-main-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.panel-to-main-modal-go,
.panel-to-main-modal-cancel {
    display: inline-block;
    padding: 12px 32px;
    font-family: pp-neue-machina-plain-regular, sans-serif;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.panel-to-main-modal-go {
    color: var(--panel-text-inverse);
    background-color: #fff;
}

.panel-to-main-modal-go:hover {
    transform: translateY(-3px);
}

.panel-to-main-modal-cancel {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.panel-to-main-modal-cancel:hover {
    background-color: rgba(255, 255, 255, 0.06);
    transform: translateY(-3px);
}

.panel-to-main-modal-cancel:focus-visible {
    background-color: rgba(255, 255, 255, 0.06);
}

.panel-to-main-modal-go:focus-visible,
.panel-to-main-modal-cancel:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.panel-logout-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}

.panel-logout-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.35s ease, visibility 0s;
}

.panel-logout-modal {
    position: relative;
    max-width: 480px;
    width: 90%;
    padding: 32px 28px;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    max-height: min(750px, 90vh);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

.panel-logout-modal-title {
    font-family: pp-neue-machina-plain-regular, sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 16px 0;
}

.panel-logout-modal-text {
    font-family: neue-haas-grot-text-roman, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 24px 0;
}

.panel-logout-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.panel-logout-modal-confirm,
.panel-logout-modal-cancel {
    display: inline-block;
    padding: 12px 32px;
    font-family: pp-neue-machina-plain-regular, sans-serif;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.panel-logout-modal-confirm {
    color: var(--panel-text-inverse);
    background-color: #fff;
}

.panel-logout-modal-confirm:hover {
    transform: translateY(-3px);
}

.panel-logout-modal-cancel {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.panel-logout-modal-cancel:hover {
    background-color: rgba(255, 255, 255, 0.06);
    transform: translateY(-3px);
}

.panel-logout-modal-cancel:focus-visible {
    background-color: rgba(255, 255, 255, 0.06);
}

.panel-logout-modal-confirm:focus-visible,
.panel-logout-modal-cancel:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* allow internal scroll; no clipping from html/body */
html:has(body.panel-index),
body.panel-index {
    overflow: visible !important;
}

.panel-index {
    margin: 0;
    min-height: 100vh;
    position: relative;
}

.panel-index-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

body.panel-bg-full .panel-index-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(to bottom, rgba(255, 255, 255, 0.1) 0%, transparent 14%),
        linear-gradient(to top, rgba(255, 255, 255, 0.1) 0%, transparent 14%),
        linear-gradient(to right, rgba(255, 255, 255, 0.07) 0%, transparent 12%),
        linear-gradient(to left, rgba(255, 255, 255, 0.07) 0%, transparent 12%);
}

body.panel-bg-spots .panel-index-waves {
    display: none;
}   

body.panel-bg-spots .panel-neurons canvas {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.panel-neurons .panel-index-spot {
    z-index: 1;
}

.panel-neurons .panel-index-spot--tl {
    background: radial-gradient(
        circle at 55% 55%,
        rgba(139, 92, 246, 0.35),
        rgba(147, 51, 234, 0.12) 45%,
        transparent 65%
    );
}

.panel-fixed-btns {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-fixed-btns .panel-lang-fixed {
    position: static;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.panel-bg-btn-fixed {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    border-radius: 10px;
    cursor: pointer;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.panel-bg-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.3);
}

body.panel-bg-full .panel-bg-btn {
    background: #fff;
    border: 1px solid #fff;
    color: var(--panel-text-inverse);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
}

body.panel-bg-full .panel-bg-btn:hover {
    background: #fff;
    border: 1px solid #fff;
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.4);
}

body.panel-bg-spots .panel-bg-btn {
    background: var(--panel-bg-body);
    border: 1px solid rgba(255, 255, 255, 0.85);
    color: #fff;
}

body.panel-bg-spots .panel-bg-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.95);
}

.panel-index-waves {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 200vw;
    height: 200vh;
    margin-left: -100vw;
    margin-top: -100vh;
    background-image: url("/img/waves-light.svg");
    background-repeat: repeat; 
    background-position: 0 0;
    transform-origin: center center;
    animation: panel-waves-rotate 28s ease-in-out infinite, panel-waves-pulse 11s ease-in-out infinite;
}

@keyframes panel-waves-rotate {
    0%, 100% {
        transform: rotate(-5deg);
    }
    50% {
        transform: rotate(5deg);
    }
}

@keyframes panel-waves-pulse {
    0%, 100% {
        opacity: 0.88;
    }
    50% {
        opacity: 1;
    }
}

.panel-index-spot {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(40px);
    will-change: transform;
}
 
.panel-index-spot--tl {
    top: 0;
    left: 0;
    width: min(90vw, 420px);
    height: min(90vw, 420px);
    transform: translate(-35%, -35%) scale(0.95);
    background: radial-gradient(
        circle at 55% 55%,
        rgba(255, 255, 255, 0.35),
        rgba(255, 255, 255, 0.12) 45%,
        transparent 65%
    );
    animation: panel-spot-tl 18s ease-in-out infinite;
}
 
.panel-index-spot--tr {
    top: 0;
    right: 0;
    width: min(70vw, 320px);
    height: min(70vw, 320px);
    transform: translate(35%, -35%) scale(1.05);
    background: radial-gradient(
        circle at 45% 55%,
        rgba(6, 182, 212, 0.32),
        rgba(34, 211, 238, 0.1) 50%,
        transparent 70%
    );
    animation: panel-spot-tr 20s ease-in-out infinite 1s;
}
 
.panel-index-spot--bl {
    bottom: 0;
    left: 0;
    width: min(85vw, 380px);
    height: min(85vw, 380px);
    transform: translate(-35%, 35%) scale(0.9);
    background: radial-gradient(
        circle at 42% 42%,
        rgba(6, 182, 212, 0.32),
        rgba(34, 211, 238, 0.14) 40%,
        transparent 68%
    );
    animation: panel-spot-bl 19s ease-in-out infinite 2s;
}
 
.panel-index-spot--br {
    bottom: 0;
    right: 0;
    width: min(75vw, 360px);
    height: min(75vw, 360px);
    transform: translate(35%, 35%) scale(1.02);
    background: radial-gradient(
        circle at 60% 45%,
        rgba(139, 92, 246, 0.28),
        rgba(147, 51, 234, 0.12) 55%,
        transparent 75%
    );
    animation: panel-spot-br 22s ease-in-out infinite 0.5s;
}
 
@keyframes panel-spot-tl {
    0%, 100% {
        transform: translate(-35%, -35%) scale(0.95);
    }
    50% {
        transform: translate(-42%, -28%) scale(1.1);
    }
}

@keyframes panel-spot-tr {
    0%, 100% {
        transform: translate(35%, -35%) scale(1.05);
    }
    50% {
        transform: translate(42%, -38%) scale(0.9);
    }
}

@keyframes panel-spot-bl {
    0%, 100% {
        transform: translate(-35%, 35%) scale(0.9);
    }
    50% {
        transform: translate(-28%, 42%) scale(1.08);
    }
}

@keyframes panel-spot-br {
    0%, 100% {
        transform: translate(35%, 35%) scale(1.02);
    }
    50% {
        transform: translate(38%, 40%) scale(0.92);
    }
}

.panel-withdraw-address-wrap {
    margin-bottom: 18px;
    position: relative;
}
.panel-withdraw-address-input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-family: monospace;
    box-sizing: border-box;
    transition: border-color 0.2s, background 0.2s;
}
.panel-withdraw-address-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.08);
}
.panel-withdraw-address-wrap {
    position: relative;
    margin-bottom: 18px;
}
.panel-withdraw-btn {
    width: 100%;
    padding: 14px 24px;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.panel-withdraw-btn.is-active {
    margin-top: 18px;
    background: #ffffff;
    color: var(--panel-text-inverse);
    cursor: pointer;
}

.panel-withdraw-btn.is-active:hover {
    background: rgba(255, 255, 255, 0.95);
}

.panel-withdraw-btn.is-active:active {
    background: rgba(255, 255, 255, 0.9);
}

.panel-withdraw-btn:hover:not(.is-active) {
    background: rgba(255, 255, 255, 0.18);
}

.panel-withdraw-btn:active:not(.is-active) {
    background: rgba(255, 255, 255, 0.15);
}

/* Investments stake button - same as withdraw but with own class and margin */
.panel-invest-btn {
    width: 100%;
    margin-top: 18px;
    padding: 14px 24px;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.panel-invest-btn span:empty {
    display: none;
}

.panel-invest-btn.is-active {
    background: #ffffff;
    color: var(--panel-text-inverse);
    cursor: pointer;
}
.panel-invest-btn.is-active:hover {
    background: rgba(255, 255, 255, 0.95);
}
.panel-invest-btn.is-active:active {
    background: rgba(255, 255, 255, 0.9);
}
.panel-invest-btn:hover:not(.is-active) {
    background: rgba(255, 255, 255, 0.18);
}
.panel-invest-btn:active:not(.is-active) {
    background: rgba(255, 255, 255, 0.15);
}

.panel-withdraw-errors {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
}

.panel-withdraw-errors .panel-error[hidden] {
    display: none;
}
.panel-withdraw-confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.panel-withdraw-confirm-modal {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 24px;
    max-width: 480px;
    width: 100%;
    box-sizing: border-box;
    max-height: min(750px, 90vh);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}
.panel-withdraw-confirm-title {
    font-size: 18px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.98);
    margin: 0 0 16px 0;
}
.panel-withdraw-confirm-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 16px 0;
    line-height: 1.5;
}
.panel-withdraw-confirm-address {
    font-family: monospace;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    word-break: break-all;
}

.panel-withdraw-confirm-address-highlight {
    color: #ffffff;
    font-weight: 700;
}
.panel-withdraw-confirm-countdown {
    font-size: 14px;
    font-weight: 600;
    color: inherit;
    text-align: center;
    font-family: inherit;
    line-height: 1.4;
}
.panel-withdraw-confirm-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.panel-withdraw-confirm-actions:has(> :only-child) {
    justify-content: center;
}

.panel-withdraw-confirm-actions:has(> :only-child) .panel-withdraw-confirm-btn {
    max-width: 200px;
}
.panel-withdraw-confirm-btn {
    flex: 1;
    padding: 12px 24px;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.panel-withdraw-confirm-btn.is-active {
    background: #ffffff;
    color: var(--panel-text-inverse);
}

.panel-withdraw-confirm-btn:hover:not(:disabled):not(.is-active) {
    background: rgba(255, 255, 255, 0.18);
}

.panel-withdraw-confirm-btn:hover.is-active {
    background: rgba(255, 255, 255, 0.95);
}

.panel-withdraw-confirm-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.panel-withdraw-confirm-btn p {
    margin: 0;
    line-height: 1.4;
}
.panel-withdraw-confirm-cancel {
    flex: 1;
    padding: 12px 24px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}
.panel-withdraw-confirm-cancel:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
}

/* ---- Create address button ---- */
.panel-deposit-create-addr-btn {
    display: block;
    width: 100%;
    max-width: 320px;
    margin: 16px auto;
    padding: 14px 24px;
    border: none;
    border-radius: 10px;
    background: #ffffff;
    color: #000000;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: opacity 0.2s;
}
.panel-deposit-create-addr-btn:hover {
    opacity: 0.85;
}
.panel-deposit-create-addr-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.panel-deposit-address-waiting {
    display: block;
    width: 100%;
    max-width: 520px;
    margin: 16px auto;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    color: var(--panel-text-primary, rgba(255, 255, 255, 0.88));
    font-size: 13px;
    font-family: neue-haas-grot-text-roman, sans-serif;
    line-height: 1.35;
    text-align: center;
}
