.auth-panel.is-account-view {
    width: min(980px, calc(100vw - 40px));
}

.auth-panel.is-account-view .auth-summary {
    width: min(420px, 100%);
}

.auth-dialog[data-auth-mode="account"] {
    max-height: calc(100vh - 94px);
    padding: 0;
    overflow: auto;
    background:
        radial-gradient(circle at 12% 0%, rgba(73, 164, 222, 0.14), transparent 32rem),
        linear-gradient(145deg, rgba(6, 13, 31, 0.96), rgba(10, 15, 34, 0.97));
    border-color: rgba(143, 215, 255, 0.25);
    border-radius: 18px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.44);
}

.auth-dialog[data-auth-mode="account"] > .auth-message {
    margin: 0;
    padding: 0 28px 20px;
}

.auth-account-panel {
    grid-template-columns: minmax(0, 2.05fr) minmax(250px, 0.95fr);
    gap: 0;
}

.account-view-header {
    grid-column: 1 / -1;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 25px 28px 21px;
    text-align: left;
    border-bottom: 1px solid rgba(168, 208, 230, 0.13);
}

.account-view-eyebrow,
.account-card-eyebrow,
.payment-eyebrow {
    margin: 0 0 5px;
    color: #8fd7ff;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.account-view-header h2 {
    margin: 0;
    color: #f7fbff;
    font-size: 1.45rem;
    letter-spacing: -0.02em;
}

.account-view-header > div > p:last-child {
    max-width: 620px;
    margin: 7px 0 0;
    color: rgba(216, 237, 248, 0.67);
    font-size: 0.86rem;
    line-height: 1.45;
}

.payment-panel {
    display: grid;
    gap: 18px;
    min-width: 0;
    padding: 24px 28px 28px;
}

.payment-heading,
.payment-purchase-heading {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    justify-content: space-between;
    text-align: left;
}

.payment-heading h2,
.payment-purchase-heading h3,
.payment-exchange h3,
.account-security-card h2 {
    margin: 0;
    color: #f5f8ff;
}

.payment-heading h2 {
    font-size: 1.08rem;
}

.payment-quiet-button,
.payment-exchange button,
.payment-package-button {
    color: #d8edf8;
    background: rgba(168, 208, 230, 0.08);
    border: 1px solid rgba(168, 208, 230, 0.24);
    border-radius: 999px;
    cursor: pointer;
    font: inherit;
    transition: 160ms ease;
}

.payment-quiet-button {
    min-height: 32px;
    padding: 5px 12px;
    font-size: 0.76rem;
    white-space: nowrap;
}

.payment-balances {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.payment-balances div {
    position: relative;
    display: grid;
    gap: 6px;
    min-height: 88px;
    padding: 16px;
    overflow: hidden;
    text-align: left;
    background: linear-gradient(135deg, rgba(143, 215, 255, 0.12), rgba(143, 215, 255, 0.045));
    border: 1px solid rgba(143, 215, 255, 0.24);
    border-radius: 14px;
}

.payment-balances div::after {
    position: absolute;
    right: -18px;
    bottom: -32px;
    width: 90px;
    height: 90px;
    background: rgba(143, 215, 255, 0.08);
    border-radius: 50%;
    content: "";
}

.payment-balances span {
    color: rgba(216, 237, 248, 0.68);
    font-size: 0.76rem;
}

.payment-balances strong {
    position: relative;
    z-index: 1;
    align-self: end;
    color: #bce9ff;
    font-size: 1.55rem;
    line-height: 1;
}

.payment-action-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(190px, 0.85fr);
    gap: 12px;
    align-items: stretch;
}

.payment-purchase-card,
.payment-exchange,
.account-security-card {
    padding: 17px;
    text-align: left;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(168, 208, 230, 0.15);
    border-radius: 14px;
}

.payment-purchase-card {
    display: grid;
    gap: 14px;
}

.payment-purchase-heading {
    display: grid;
    gap: 5px;
}

.payment-purchase-heading h3,
.payment-exchange h3 {
    font-size: 0.96rem;
}

.payment-purchase-heading p,
.payment-exchange p,
.account-security-card > p:not(.account-card-eyebrow) {
    margin: 0;
    color: rgba(216, 237, 248, 0.62);
    font-size: 0.74rem;
    line-height: 1.45;
}

.payment-packages {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

.payment-package-button {
    position: relative;
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 13px 7px;
    border-radius: 10px;
}

.payment-package-button strong {
    color: #f5f8ff;
    font-size: 1.02rem;
}

.payment-package-button span {
    color: rgba(216, 237, 248, 0.56);
    font-size: 0.64rem;
}

.payment-package-button:hover,
.payment-package-button:focus-visible,
.payment-quiet-button:hover,
.payment-quiet-button:focus-visible {
    color: #071326;
    background: #9edfff;
    border-color: #9edfff;
    outline: none;
    transform: translateY(-1px);
}

.payment-package-button:hover strong,
.payment-package-button:focus-visible strong,
.payment-package-button:hover span,
.payment-package-button:focus-visible span {
    color: #071326;
}

.payment-exchange {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.payment-section-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: #8fd7ff;
    background: rgba(143, 215, 255, 0.1);
    border: 1px solid rgba(143, 215, 255, 0.23);
    border-radius: 10px;
    font-size: 1rem;
}

.payment-exchange label {
    margin-top: auto;
    color: rgba(216, 237, 248, 0.76);
    font-size: 0.7rem;
    font-weight: 650;
}

.payment-exchange-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
}

.payment-exchange input {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 0 12px;
    color: #f5f8ff;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(168, 208, 230, 0.24);
    border-radius: 9px;
    box-sizing: border-box;
    font: inherit;
    outline: none;
}

.payment-exchange input:focus {
    border-color: rgba(143, 215, 255, 0.65);
    box-shadow: 0 0 0 3px rgba(143, 215, 255, 0.08);
}

.payment-exchange button {
    min-height: 40px;
    padding: 8px 14px;
    color: #071326;
    background: #8fd7ff;
    border-color: #8fd7ff;
    font-weight: 750;
}

.payment-feedback-row {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}

.payment-status {
    min-height: 1.2em;
    margin: 0;
    color: #a8d0e6;
    font-size: 0.76rem;
    line-height: 1.4;
    text-align: left;
}

.payment-status.is-error { color: #ffb3a7; }
.payment-status.is-success { color: #8fd7ff; }

.payment-secure-note {
    color: rgba(216, 237, 248, 0.46);
    font-size: 0.67rem;
    white-space: nowrap;
}

.payment-secure-note::before {
    margin-right: 5px;
    color: #8fd7ff;
    content: "●";
    font-size: 0.55rem;
}

.payment-history-block {
    padding-top: 2px;
    text-align: left;
    border-top: 1px solid rgba(168, 208, 230, 0.12);
}

.payment-history-block summary {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 15px 0 0;
    color: #d8edf8;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 700;
    list-style: none;
}

.payment-history-block summary::-webkit-details-marker { display: none; }
.payment-history-block summary::after { color: #8fd7ff; content: "+"; font-size: 1rem; }
.payment-history-block[open] summary::after { content: "−"; }

.payment-history-hint {
    grid-column: 1;
    color: rgba(216, 237, 248, 0.48);
    font-size: 0.68rem;
    font-weight: 400;
}

.payment-history {
    display: grid;
    gap: 7px;
    margin-top: 12px;
}

.payment-history-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 5px 10px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(168, 208, 230, 0.15);
    border-radius: 9px;
}

.payment-history-item strong,
.payment-history-item time { color: #f5f8ff; font-size: 0.77rem; }
.payment-history-item span { color: rgba(216, 237, 248, 0.62); font-size: 0.7rem; }
.payment-history-item .is-paid { color: #8fd7ff; }
.payment-history-item .is-failed { color: #ffb3a7; }
.payment-history-more { margin-top: 9px; }

.account-side-panel {
    display: grid;
    align-content: start;
    gap: 14px;
    min-width: 0;
    padding: 24px 22px 28px;
    background: rgba(0, 0, 0, 0.13);
    border-left: 1px solid rgba(168, 208, 230, 0.12);
}

.account-side-panel .auth-rewards-panel,
.account-security-card {
    padding: 16px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(168, 208, 230, 0.14);
    border-radius: 14px;
}

.account-side-panel .auth-rewards-header {
    align-items: start;
}

.account-side-panel .auth-rewards-header h2,
.account-security-card h2 {
    color: #f5f8ff;
    font-size: 0.95rem;
}

.account-side-panel .auth-reward-balance {
    padding: 11px 12px;
    background: rgba(143, 215, 255, 0.07);
    border-color: rgba(143, 215, 255, 0.2);
    border-radius: 10px;
}

.account-side-panel .auth-reward-list {
    max-height: 240px;
}

.account-security-card {
    display: grid;
    gap: 9px;
}

.account-security-card .auth-secondary-button {
    min-height: 42px;
    margin-top: 5px;
}

.payment-package-button:disabled,
.payment-quiet-button:disabled,
.payment-exchange button:disabled {
    cursor: wait;
    opacity: 0.58;
    transform: none;
}

@media (max-width: 900px) {
    .auth-account-panel {
        grid-template-columns: minmax(0, 1fr);
    }

    .account-side-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        border-top: 1px solid rgba(168, 208, 230, 0.12);
        border-left: 0;
    }
}

@media (max-width: 700px) {
    .auth-panel.is-account-view {
        width: 100%;
    }

    .auth-panel.is-account-view .auth-summary {
        width: 100%;
    }

    .auth-dialog[data-auth-mode="account"] {
        max-height: none;
        border-radius: 14px;
    }

    .account-view-header,
    .payment-panel,
    .account-side-panel {
        padding-right: 18px;
        padding-left: 18px;
    }

    .payment-action-grid,
    .account-side-panel {
        grid-template-columns: minmax(0, 1fr);
    }

    .payment-exchange-row {
        grid-template-columns: minmax(0, 1fr) auto;
    }
}

@media (max-width: 480px) {
    .account-view-header h2 { font-size: 1.25rem; }
    .payment-balances { grid-template-columns: minmax(0, 1fr); }
    .payment-packages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .payment-feedback-row { align-items: flex-start; flex-direction: column; }
    .payment-exchange-row { grid-template-columns: minmax(0, 1fr); }
}
