.dash-wrap {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.dash-profile {
    position: relative;
    overflow: hidden;
    background: linear-gradient(132deg, rgba(233, 30, 140, 0.14), rgba(88, 101, 242, 0.1) 52%, rgba(21, 15, 20, 0.92));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(233, 30, 140, 0.36);
    border-radius: var(--r);
    padding: 24px 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 22px 58px rgba(0, 0, 0, 0.42);
}

.dash-profile::before {
    content: "";
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
    pointer-events: none;
}

.dash-profile-id {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.avatar-ring {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid rgba(233, 30, 140, 0.62);
    background: linear-gradient(135deg, var(--accent-2), var(--accent));
    box-shadow: 0 0 24px rgba(233, 30, 140, 0.28);
    color: #180713;
    font-size: 20px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    text-transform: uppercase;
}

.avatar-ring img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dash-profile-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.dash-profile-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.dash-profile-title strong {
    font-size: 21px;
    font-weight: 400;
    color: var(--text);
}

.role-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin-top: 3px;
}

.role-badges.compact {
    gap: 6px;
    margin-top: 4px;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: 999px;
    border: 1px solid var(--line-2);
    background: rgba(255, 255, 255, 0.045);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: lowercase;
    line-height: 1.25;
    color: var(--text);
    white-space: nowrap;
}

.role-badges.compact .role-badge {
    padding: 3px 9px;
    font-size: 10.5px;
    letter-spacing: 0.06em;
}

.role-badge::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.9;
    flex-shrink: 0;
}

.role-badge.owner {
    background: linear-gradient(125deg, rgba(251, 191, 36, 0.25), rgba(233, 30, 140, 0.28));
    border-color: rgba(251, 191, 36, 0.65);
    color: #fde68a;
    box-shadow: inset 0 1px 0 rgba(255, 240, 185, 0.3), 0 0 20px rgba(233, 30, 140, 0.3), 0 0 10px rgba(251, 191, 36, 0.18);
}

.role-badge.owner::before {
    background: linear-gradient(135deg, #fde68a, #f472b6);
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.85);
}

.role-badge.buyer {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(52, 211, 153, 0.52);
    color: #6ee7b7;
    box-shadow: inset 0 1px 0 rgba(167, 243, 208, 0.18), 0 0 14px rgba(16, 185, 129, 0.18);
}

.role-badge.staff {
    background: rgba(56, 189, 248, 0.14);
    border-color: rgba(56, 189, 248, 0.52);
    color: #7dd3fc;
    box-shadow: inset 0 1px 0 rgba(186, 230, 253, 0.18), 0 0 14px rgba(56, 189, 248, 0.16);
}

.role-badge.vip {
    background: rgba(167, 139, 250, 0.16);
    border-color: rgba(167, 139, 250, 0.52);
    color: #ddd6fe;
    box-shadow: inset 0 1px 0 rgba(221, 214, 254, 0.2), 0 0 14px rgba(139, 92, 246, 0.18);
}

.role-badge.verified {
    background: rgba(88, 101, 242, 0.2);
    border-color: rgba(129, 140, 248, 0.55);
    color: #c7d2fe;
    box-shadow: inset 0 1px 0 rgba(199, 210, 254, 0.2), 0 0 14px rgba(88, 101, 242, 0.2);
}

.role-badge.muted,
.role-badge.guest {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--line);
    color: var(--dim-2);
    box-shadow: none;
}

.hwid-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--dim-2);
    margin-top: 2px;
}

.hwid-line code {
    font-family: var(--font-mono);
    color: var(--dim);
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 2px 7px;
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: lowercase;
    border: 1px solid var(--line-2);
    background: rgba(255, 255, 255, 0.04);
    color: var(--dim);
}

.badge-pill.ok {
    border-color: rgba(74, 222, 128, 0.42);
    color: var(--ok);
    background: rgba(74, 222, 128, 0.09);
}

.badge-pill.warn {
    border-color: rgba(251, 191, 36, 0.42);
    color: var(--warn);
    background: rgba(251, 191, 36, 0.09);
}

.badge-pill.accent {
    border-color: rgba(233, 30, 140, 0.48);
    color: var(--accent-2);
    background: rgba(233, 30, 140, 0.11);
}

.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.dash-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dash-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(21, 15, 20, 0.92));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 16px 40px rgba(0, 0, 0, 0.34);
    transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.dash-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 18px;
    right: 18px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
    pointer-events: none;
}

.dash-card:hover {
    border-color: var(--line-2);
}

.dash-card.accent {
    border-color: rgba(233, 30, 140, 0.44);
    background: linear-gradient(145deg, rgba(233, 30, 140, 0.1), rgba(21, 15, 20, 0.94) 60%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 20px 52px rgba(233, 30, 140, 0.1);
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.dash-card h4 {
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: lowercase;
    color: var(--dim-2);
    font-weight: 400;
}

.dash-card .big {
    font-size: 24px;
    font-weight: 300;
}

.dash-card .sub {
    font-size: 12.5px;
    color: var(--dim-2);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

#dash-owned-summary {
    color: var(--dim);
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.025);
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    background: var(--ok);
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.65);
}

.status-dot.warn {
    background: var(--warn);
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.65);
}

.status-dot.bad {
    background: var(--bad);
    box-shadow: 0 0 10px rgba(248, 113, 113, 0.65);
}

.dash-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 13.5px;
    color: var(--dim);
}

#dash-orders {
    max-height: 280px;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(233, 30, 140, 0.35) transparent;
}

.dash-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 10px;
}

.dash-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.dash-list .t {
    color: var(--dim-2);
    font-size: 12px;
    white-space: nowrap;
}

.dash-list .t.ok {
    color: var(--ok);
}

.dash-list .t.warn {
    color: var(--warn);
}

.card-head .pill {
    font-size: 10.5px;
    padding: 3px 10px;
}

.dash-divider {
    height: 1px;
    background: var(--line);
    margin: 6px 0 4px;
}

.dash-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.keyrow {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.keyrow code {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.04em;
    color: var(--text);
    background: rgba(255, 255, 255, 0.045);
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--line);
}

.redeem-row,
.cred-row {
    display: flex;
    gap: 8px;
    margin-top: 4px;
    align-items: center;
}

.cred-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.redeem-row input,
.cred-row input {
    flex: 1;
    min-width: 140px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--line-2);
    padding: 7px 2px;
    font-size: 13px;
    color: var(--text);
    outline: none;
    transition: border-color 0.25s var(--ease);
}

.redeem-row input {
    font-family: var(--font-mono);
}

.redeem-row input:focus,
.cred-row input:focus {
    border-color: var(--accent);
}

.copy-btn {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--line-2);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    color: var(--dim);
    cursor: pointer;
    transition: border-color 0.25s var(--ease), color 0.25s var(--ease), background 0.25s var(--ease);
}

.copy-btn:hover {
    border-color: var(--accent);
    color: var(--text);
    background: var(--accent-soft);
}

.copy-btn.mini {
    padding: 2px 8px;
    font-size: 11px;
}

.copy-btn.accent-link {
    border-color: rgba(233, 30, 140, 0.45);
    color: var(--accent-2);
    background: rgba(233, 30, 140, 0.09);
}

.owner-card {
    border-color: rgba(233, 30, 140, 0.35);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 18px 46px rgba(0, 0, 0, 0.44), 0 0 36px rgba(233, 30, 140, 0.07);
}

.owner-gen-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 6px;
}

.owner-gen-row select,
.owner-gen-row input {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line-2);
    border-radius: 9px;
    padding: 8px 12px;
    font-size: 13px;
    color: var(--text);
    outline: none;
    transition: border-color 0.22s var(--ease);
}

.owner-gen-row select option {
    background: #150f14;
    color: var(--text);
}

.owner-gen-row input {
    flex: 1;
    min-width: 180px;
}

.owner-gen-row select:focus,
.owner-gen-row input:focus {
    border-color: var(--accent);
}

.owner-gen-out {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(74, 222, 128, 0.38);
    background: rgba(74, 222, 128, 0.07);
}

.owner-gen-out code {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--ok);
    word-break: break-all;
}

.owner-key-list {
    margin-top: 8px;
    max-height: 290px;
    overflow-y: auto;
    padding-right: 4px;
}

.owner-key-item {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.owner-key-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.owner-key-info code {
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 3px 8px;
}

.owner-key-meta {
    font-size: 12px;
    color: var(--dim);
}

.owner-key-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 85;
    background: rgba(8, 5, 8, 0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    overflow-y: auto;
}

.checkout-box {
    position: relative;
    width: 100%;
    max-width: 560px;
    background: rgba(19, 13, 18, 0.96);
    border: 1px solid rgba(233, 30, 140, 0.42);
    border-radius: var(--r);
    padding: 24px 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 28px 80px rgba(0, 0, 0, 0.65), 0 0 42px rgba(233, 30, 140, 0.12);
}

.checkout-box h3 {
    font-size: 17px;
    font-weight: 400;
    letter-spacing: 0.04em;
}

.chk-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    border: 1px solid var(--line-2);
    background: rgba(255, 255, 255, 0.03);
    font-size: 14px;
}

.chk-summary strong {
    font-size: 18px;
    font-weight: 500;
    color: var(--accent-2);
}

.chk-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chk-tab {
    flex: 1 1 auto;
    padding: 7px 11px;
    font-size: 11.5px;
    letter-spacing: 0.06em;
    text-transform: lowercase;
    color: var(--dim);
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease);
}

.chk-tab:hover {
    color: var(--text);
    border-color: var(--line-2);
}

.chk-tab.active {
    color: var(--text);
    border-color: rgba(233, 30, 140, 0.6);
    background: rgba(233, 30, 140, 0.16);
}

.chk-crypto-grid {
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
}

.chk-qr-wrap {
    width: 128px;
    height: 128px;
    border-radius: 10px;
    border: 1px solid var(--line-2);
    background: #140d13;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chk-qr-wrap svg {
    width: 100%;
    height: 100%;
    display: block;
}

.chk-crypto-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.chk-crypto-details .keyrow code {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#view-dashboard.enter {
    animation: dashIn 0.45s var(--ease) both;
}

#view-dashboard.leave {
    animation: dashOut 0.35s var(--ease) both;
}

@keyframes dashIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes dashOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-12px);
    }
}

.stagger > * {
    opacity: 0;
    animation: staggerIn 0.42s var(--ease) forwards;
}

.stagger > *:nth-child(1) {
    animation-delay: 0.04s;
}

.stagger > *:nth-child(2) {
    animation-delay: 0.1s;
}

.stagger > *:nth-child(3) {
    animation-delay: 0.16s;
}

.stagger > *:nth-child(4) {
    animation-delay: 0.22s;
}

.stagger > *:nth-child(5) {
    animation-delay: 0.28s;
}

.stagger > *:nth-child(6) {
    animation-delay: 0.34s;
}

@keyframes staggerIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1024px) {
    .dash-grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dash-grid-3 > .dash-card:last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 720px) {
    .dash-grid,
    .dash-grid-3 {
        grid-template-columns: 1fr;
    }

    .dash-grid-3 > .dash-card:last-child {
        grid-column: auto;
    }

    .dash-profile {
        padding: 18px 16px;
        flex-direction: column;
        align-items: flex-start;
    }

    .dash-card {
        padding: 18px 16px;
    }

    .redeem-row,
    .cred-row,
    .owner-gen-row {
        flex-direction: column;
        align-items: stretch;
    }

    .owner-gen-row select,
    .owner-gen-row input,
    .owner-gen-row button {
        width: 100%;
    }

    .modal-backdrop {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(8, 5, 8, 0.92);
        padding: 12px;
    }

    .checkout-box {
        padding: 18px 15px;
    }

    .chk-crypto-grid {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .chk-crypto-details {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .stagger > *,
    #view-dashboard.enter,
    #view-dashboard.leave {
        opacity: 1;
        animation: none;
    }
}
