.dashboard-shell {
    --shell-sidebar-bg: radial-gradient(circle at 20% 8%, rgba(124, 58, 237, 0.2), transparent 46%), radial-gradient(circle at 88% 100%, rgba(219, 39, 119, 0.18), transparent 54%), #0a0f1f;
    --shell-nav-bg: rgba(255, 255, 255, 0.02);
    --shell-nav-border: rgba(255, 255, 255, 0.06);
    --shell-nav-border-hover: rgba(139, 92, 246, 0.4);
    --shell-nav-text: rgba(226, 232, 240, 0.9);
    --shell-nav-text-muted: rgba(148, 163, 184, 0.9);
    --shell-nav-active-bg: linear-gradient(135deg, rgba(124, 58, 237, 0.24), rgba(219, 39, 119, 0.16));
    --shell-nav-active-border: rgba(139, 92, 246, 0.5);
    --shell-nav-active-text: #f8fafc;
    --shell-shadow: 20px 0 42px rgba(2, 8, 23, 0.35);
}

.dashboard-shell .sidebar {
    background: var(--shell-sidebar-bg) !important;
    border-right: 1px solid rgba(124, 58, 237, 0.2) !important;
    box-shadow: var(--shell-shadow);
}

.dashboard-shell .sidebar-logo {
    padding: 22px 20px;
    gap: 10px;
}

.dashboard-shell .sidebar-logo img {
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(124, 58, 237, 0.28);
}

.dashboard-shell .sidebar-logo span {
    font-size: 17px;
    letter-spacing: -0.3px;
}

.dashboard-shell .sidebar-nav {
    padding: 12px 14px;
    gap: 10px;
}

.dashboard-shell .sidebar-nav a {
    background: var(--shell-nav-bg);
    border: 1px solid transparent;
    color: var(--shell-nav-text-muted);
    border-radius: 14px;
    min-height: 48px;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.dashboard-shell .sidebar-nav a:hover {
    transform: translateX(2px);
    border-color: var(--shell-nav-border-hover);
    background: rgba(124, 58, 237, 0.14);
    color: var(--shell-nav-text);
}

.dashboard-shell .sidebar-nav a.active {
    border-left: 1px solid var(--shell-nav-active-border);
    border-color: var(--shell-nav-active-border);
    background: var(--shell-nav-active-bg);
    color: var(--shell-nav-active-text);
    box-shadow: 0 10px 24px rgba(124, 58, 237, 0.22);
}

.dashboard-shell .sidebar-nav a.active svg {
    filter: drop-shadow(0 0 8px rgba(167, 139, 250, 0.35));
}

.dashboard-shell .sidebar-mobile-footer {
    padding: 14px;
    border-top: 1px solid rgba(124, 58, 237, 0.2);
}

.dashboard-shell .mobile-topbar {
    background: rgba(8, 14, 30, 0.88);
    border-bottom: 1px solid rgba(124, 58, 237, 0.2);
    backdrop-filter: blur(12px);
}

.dashboard-shell .mobile-topbar-title {
    letter-spacing: -0.2px;
}

html[data-theme="light"] .dashboard-shell {
    --shell-sidebar-bg: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
    --shell-nav-bg: rgba(124, 58, 237, 0.05);
    --shell-nav-border: rgba(124, 58, 237, 0.16);
    --shell-nav-border-hover: rgba(124, 58, 237, 0.35);
    --shell-nav-text: #0f172a;
    --shell-nav-text-muted: #334155;
    --shell-nav-active-bg: linear-gradient(135deg, rgba(124, 58, 237, 0.14), rgba(219, 39, 119, 0.1));
    --shell-nav-active-border: rgba(124, 58, 237, 0.42);
    --shell-nav-active-text: #0f172a;
    --shell-shadow: 18px 0 32px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .dashboard-shell .sidebar {
    border-right-color: rgba(124, 58, 237, 0.2) !important;
}

html[data-theme="light"] .dashboard-shell .mobile-topbar {
    background: rgba(247, 250, 255, 0.9);
    border-bottom-color: rgba(124, 58, 237, 0.2);
}

.dashboard-shell {
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 18px;
    --shell-card-bg: linear-gradient(160deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.7));
    --shell-card-border: rgba(148, 163, 184, 0.2);
    --shell-card-shadow: 0 12px 28px rgba(2, 8, 23, 0.25);
}

.dashboard-shell .dash-wrap {
    max-width: 1160px;
    padding-top: 30px;
}

.dashboard-shell .sidebar-group-label {
    margin: 6px 2px 0;
    padding: 0 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.9);
}

.dashboard-shell .dash-overview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.dashboard-shell .dash-overview-main {
    min-width: 0;
}

.dashboard-shell .dash-kicker {
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.95);
}

.dashboard-shell .dash-overview h1 {
    margin: 0;
    font-size: clamp(24px, 2.6vw, 31px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.6px;
}

.dashboard-shell .dash-overview h1 span {
    color: #a78bfa;
    background: none;
    -webkit-text-fill-color: currentColor;
}

.dashboard-shell .dash-overview .dash-email {
    margin: 5px 0 0;
    font-size: 13px;
    color: rgba(148, 163, 184, 0.95);
}

.dashboard-shell .dash-user-cluster {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.dashboard-shell .status-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 999px;
    border: 1px solid rgba(34, 197, 94, 0.4);
    background: rgba(22, 163, 74, 0.14);
    color: #dcfce7;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.dashboard-shell .status-chip::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.22);
}

.dashboard-shell .dash-user {
    padding: 5px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    background: rgba(15, 23, 42, 0.5);
}

.dashboard-shell .dash-avatar {
    width: 36px;
    height: 36px;
    font-size: 14px;
    box-shadow: 0 10px 24px rgba(124, 58, 237, 0.32);
}

.dashboard-shell .dash-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.dashboard-shell .dash-stat {
    position: relative;
    min-height: 136px;
    background: var(--shell-card-bg);
    border: 1px solid var(--shell-card-border);
    border-radius: var(--radius-md);
    padding: 18px 18px 16px;
    box-shadow: var(--shell-card-shadow);
}

.dashboard-shell .dash-stat::before {
    content: "";
    position: absolute;
    top: 14px;
    left: 14px;
    width: 4px;
    height: 24px;
    border-radius: 8px;
    background: rgba(148, 163, 184, 0.9);
}

.dashboard-shell .dash-stat[data-accent="money"]::before {
    background: #22c55e;
}

.dashboard-shell .dash-stat[data-accent="redeemed"]::before {
    background: #22d3ee;
}

.dashboard-shell .dash-stat[data-accent="unused"]::before {
    background: #38bdf8;
}

.dashboard-shell .dash-stat[data-accent="affiliate"]::before {
    background: #f59e0b;
}

.dashboard-shell .dash-stat-label {
    margin-left: 10px;
    font-size: 12px;
    letter-spacing: 0.6px;
    color: rgba(148, 163, 184, 0.92);
}

.dashboard-shell .dash-stat-value {
    margin-top: 14px;
    font-size: clamp(32px, 3.2vw, 40px);
    letter-spacing: -0.8px;
    line-height: 1;
}

.dashboard-shell .dash-stat-sub {
    margin-top: 10px;
    font-size: 12px;
    color: rgba(148, 163, 184, 0.86);
}

.dashboard-shell .wallet-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 14px;
    margin-bottom: 22px;
}

.dashboard-shell .wallet-summary-card,
.dashboard-shell .wallet-transactions-card {
    background: linear-gradient(170deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.76));
    border: 1px solid var(--shell-card-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shell-card-shadow);
}

.dashboard-shell .wallet-summary-card {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 170px;
}

.dashboard-shell .wallet-kicker {
    margin: 0;
    font-size: 12px;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.95);
}

.dashboard-shell .wallet-balance {
    margin-top: 10px;
    font-size: clamp(34px, 3.4vw, 42px);
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1;
    color: #a78bfa;
}

.dashboard-shell .wallet-actions {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.dashboard-shell .wallet-btn {
    padding: 11px 16px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.dashboard-shell .wallet-btn.primary {
    color: #ffffff;
    background: linear-gradient(135deg, #7c3aed, #db2777);
}

.dashboard-shell .wallet-btn.secondary {
    color: #ddd6fe;
    border-color: rgba(124, 58, 237, 0.38);
    background: rgba(124, 58, 237, 0.12);
}

.dashboard-shell .wallet-btn:hover {
    transform: translateY(-1px);
}

.dashboard-shell .wallet-zero-hint {
    margin-top: 14px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px dashed rgba(167, 139, 250, 0.5);
    background: rgba(124, 58, 237, 0.12);
    color: rgba(233, 213, 255, 0.95);
    font-size: 12px;
}

.dashboard-shell .wallet-zero-hint button {
    padding: 7px 11px;
    border: 1px solid rgba(124, 58, 237, 0.45);
    border-radius: 10px;
    background: rgba(124, 58, 237, 0.2);
    color: #f5f3ff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.dashboard-shell .wallet-transactions-card {
    padding: 16px;
}

.dashboard-shell .wallet-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.dashboard-shell .wallet-card-head h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}

.dashboard-shell .wallet-card-head a {
    color: #c4b5fd;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.dashboard-shell .wallet-tx-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dashboard-shell .wallet-tx-list li {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.6);
}

.dashboard-shell .section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.dashboard-shell .btn-secondary-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid rgba(124, 58, 237, 0.38);
    background: rgba(124, 58, 237, 0.12);
    color: #ddd6fe;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
}

.dashboard-shell .code-list .code-item {
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.75);
    padding: 14px 16px;
    align-items: flex-start;
}

.dashboard-shell .code-item-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.dashboard-shell .code-topline,
.dashboard-shell .code-secondline,
.dashboard-shell .code-thirdline {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

.dashboard-shell .code-package-name {
    font-size: 14px;
    font-weight: 700;
    color: #e2e8f0;
}

.dashboard-shell .code-secondline .code-item-code {
    font-size: 16px;
    letter-spacing: 1.1px;
}

.dashboard-shell .code-thirdline {
    font-size: 12px;
    color: rgba(148, 163, 184, 0.9);
}

.dashboard-shell .btn-copy-inline {
    padding: 7px 10px;
    border-radius: 10px;
    border: 1px solid rgba(124, 58, 237, 0.4);
    background: rgba(124, 58, 237, 0.16);
    color: #ddd6fe;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

.dashboard-shell .code-badge.unused {
    border: 1px solid rgba(34, 197, 94, 0.34);
    background: rgba(34, 197, 94, 0.14);
    color: #bbf7d0;
}

.dashboard-shell .code-badge.used {
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(71, 85, 105, 0.2);
    color: #cbd5e1;
}

.dashboard-shell .code-badge.expired {
    border: 1px solid rgba(248, 113, 113, 0.35);
    background: rgba(248, 113, 113, 0.12);
    color: #fecaca;
}

.dashboard-shell .order-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dashboard-shell .order-filter {
    min-width: 140px;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.72);
    color: #e2e8f0;
    font-size: 13px;
    outline: none;
}

.dashboard-shell .order-table {
    border-color: rgba(148, 163, 184, 0.22);
}

.dashboard-shell .order-table th {
    font-size: 11px;
    letter-spacing: 0.7px;
    padding: 14px 14px;
    background: rgba(148, 163, 184, 0.08);
}

.dashboard-shell .order-table td {
    padding: 14px 14px;
    min-height: 48px;
    line-height: 1.25;
}

.dashboard-shell .order-code-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    border-radius: 10px;
    border: 1px solid rgba(124, 58, 237, 0.32);
    background: rgba(124, 58, 237, 0.14);
    color: #ddd6fe;
    font-family: "Courier New", monospace;
    font-size: 12px;
    font-weight: 700;
}

.dashboard-shell .order-code-chip button {
    border: none;
    background: transparent;
    color: #c4b5fd;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.dashboard-shell .order-action-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.dashboard-shell .order-action-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.65);
    color: #cbd5e1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.dashboard-shell .order-action-btn svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.dashboard-shell .order-action-btn.pay {
    color: #c4b5fd;
    border-color: rgba(124, 58, 237, 0.4);
    background: rgba(124, 58, 237, 0.14);
}

.dashboard-shell .order-action-btn.cancel {
    color: #fca5a5;
    border-color: rgba(248, 113, 113, 0.35);
    background: rgba(248, 113, 113, 0.1);
}

.dashboard-shell .order-action-btn.copy {
    color: #ddd6fe;
    border-color: rgba(124, 58, 237, 0.36);
    background: rgba(124, 58, 237, 0.14);
}

html[data-theme="light"] .dashboard-shell {
    --shell-card-bg: linear-gradient(170deg, rgba(255, 255, 255, 0.96), rgba(240, 249, 255, 0.9));
    --shell-card-border: rgba(14, 165, 233, 0.22);
    --shell-card-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .dashboard-shell .status-chip {
    border-color: rgba(22, 163, 74, 0.32);
    background: rgba(22, 163, 74, 0.1);
    color: #14532d;
}

html[data-theme="light"] .dashboard-shell .dash-user {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(14, 165, 233, 0.24);
}

html[data-theme="light"] .dashboard-shell .wallet-zero-hint {
    color: #0f172a;
}

html[data-theme="light"] .dashboard-shell .order-filter {
    background: rgba(255, 255, 255, 0.92);
    color: #0f172a;
}

@media (max-width: 1080px) {
    .dashboard-shell .dash-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-shell .wallet-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-shell .sidebar-group-label {
        margin-top: 2px;
    }

    .dashboard-shell .dash-wrap {
        padding-top: 18px;
    }

    .dashboard-shell .dash-overview {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .dashboard-shell .dash-user-cluster {
        width: 100%;
        justify-content: space-between;
    }

    .dashboard-shell .dash-stat {
        min-height: 120px;
    }

    .dashboard-shell .wallet-summary-card {
        min-height: 150px;
    }

    .dashboard-shell .wallet-actions {
        width: 100%;
    }

    .dashboard-shell .wallet-btn {
        flex: 1;
    }

    .dashboard-shell .order-filter {
        flex: 1;
        min-width: 110px;
    }
}

@media (max-width: 480px) {
    .dashboard-shell .dash-stats {
        grid-template-columns: 1fr;
    }

    .dashboard-shell .order-table th,
    .dashboard-shell .order-table td {
        padding: 12px 10px;
    }
}
