.profile-dashboard-page {
    padding: 56px 0 80px;
    background:
        radial-gradient(circle at top right, rgba(38, 109, 255, 0.14), transparent 32%),
        radial-gradient(circle at top left, rgba(0, 184, 255, 0.08), transparent 30%);
}

.profile-dashboard-hero {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 28px;
}

.profile-main-card {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 32px;
    min-height: 210px;
}

.profile-dashboard-card {
    background: linear-gradient(180deg, rgba(16, 24, 39, 0.96), rgba(7, 12, 22, 0.96));
    border: 1px solid rgba(80, 130, 255, 0.18);
    border-radius: 24px;
    padding: 26px;
}

.profile-main-card {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 190px;
}

.profile-avatar-wrap {
    position: relative;
    flex: 0 0 auto;
}

#profile-avatar {
    width: 132px;
    height: 132px;
    border-radius: 50%;
    border: 3px solid #2f7cff;
    object-fit: cover;
}

.profile-level {
    position: absolute;
    right: -8px;
    bottom: -8px;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, #1263ff, #093a9f);
    color: #ffffff;
    border: 2px solid rgba(105, 162, 255, 0.8);
    border-radius: 16px;
    font-weight: 900;
    font-size: 20px;
}

.profile-main-card h1 {
    margin: 8px 0 10px;
    font-size: clamp(34px, 4vw, 52px);
    line-height: 1.05;
}

.dashboard-muted,
.profile-main-card p,
.stat-card p {
    color: #9fb5d8;
}

.profile-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.secondary-btn {
    background: rgba(255,255,255,0.08);
}

.stat-card {
    min-height: 170px;
    display: grid;
    align-content: center;
    text-align: center;
}

.stat-card span {
    color: #b8c8e6;
    font-weight: 700;
}

.stat-card strong {
    display: block;
    margin: 14px 0 8px;
    font-size: 38px;
    color: #ffffff;
}

.profile-dashboard-grid {
    display: grid;
    grid-template-columns: 0.95fr 1.7fr 1.05fr;
    gap: 24px;
    margin-bottom: 24px;
}

.progress-list {
    display: grid;
    gap: 18px;
    margin-top: 20px;
}

.progress-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.progress-item span {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 12px;
    background: rgba(47,124,255,0.16);
    color: #69a2ff;
}

.progress-item.completed span {
    background: rgba(38, 201, 118, 0.16);
    color: #27d17f;
}

.progress-item p {
    margin: 4px 0 0;
    color: #9fb5d8;
}

.inventory-card {
    min-height: 320px;
    display: grid;
    place-items: center;
    text-align: center;
}

.big-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.mini-stats {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.mini-stats div {
    display: flex;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    color: #b8c8e6;
}

.mini-stats strong {
    color: #ffffff;
}

.achievements-card {
    margin-top: 24px;
}

.achievement-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 18px;
}

.achievement {
    text-align: center;
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    padding: 20px 14px;
}

.achievement span {
    display: block;
    font-size: 34px;
    margin-bottom: 10px;
}

.achievement p {
    color: #9fb5d8;
    margin: 6px 0 0;
}

@media (max-width: 1200px) {
    .profile-dashboard-hero {
        grid-template-columns: repeat(2, 1fr);
    }

    .profile-main-card {
        grid-column: 1 / -1;
    }

    .profile-dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .profile-dashboard-hero,
    .achievement-grid {
        grid-template-columns: 1fr;
    }

    .profile-main-card {
        flex-direction: column;
        align-items: flex-start;
    }
}
.dashboard-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.dashboard-section-header a {
    color: #69a2ff;
    text-decoration: none;
    font-weight: 700;
}

.profile-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 24px;
}

.activity-list {
    display: grid;
    gap: 16px;
    margin-top: 18px;
}

.activity-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.activity-item span {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(47,124,255,0.16);
    color: #69a2ff;
}

.activity-item p {
    margin: 4px 0 0;
    color: #9fb5d8;
}

.leaderboard-card {
    background:
        radial-gradient(circle at right, rgba(142, 67, 255, 0.25), transparent 45%),
        linear-gradient(180deg, rgba(16, 24, 39, 0.96), rgba(7, 12, 22, 0.96));
}

.profile-cta-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 24px;
}

.feature-card span {
    display: block;
    font-size: 42px;
    margin-bottom: 14px;
}

.feature-card p {
    color: #9fb5d8;
}

.feature-card a {
    color: #69a2ff;
    text-decoration: none;
    font-weight: 800;
}

@media (max-width: 1000px) {
    .profile-bottom-grid,
    .profile-cta-grid {
        grid-template-columns: 1fr;
    }
}

.inventory-preview {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.inventory-preview-item {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.08);
}

.inventory-preview-item img {
    width: 72px;
    height: 54px;
    object-fit: contain;
}

.inventory-preview-item p {
    margin: 4px 0 0;
    color: #9fb5d8;
    font-size: 14px;
}

.inventory-item-info{
    flex:1;
}

.inventory-item-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:16px;
}

.inventory-price{
    color:#4ea1ff;
    font-weight:700;
    white-space:nowrap;
    font-size:15px;
}

.inventory-search {
    width: 260px;
    max-width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: #ffffff;
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 24px;
}

.inventory-item-card {
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    padding: 18px;
}

.inventory-item-card img {
    width: 100%;
    height: 110px;
    object-fit: contain;
    margin-bottom: 14px;
}

.inventory-item-card p {
    color: #9fb5d8;
    margin: 8px 0 0;
}

.inventory-item-card span {
    display: inline-block;
    margin-top: 10px;
    color: #69a2ff;
    font-weight: 800;
}

@media (max-width: 1100px) {
    .inventory-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .inventory-grid {
        grid-template-columns: 1fr;
    }
}

/* ===========================
   Inventory Scan Modal
=========================== */

.inventory-scan-modal{
    position:fixed;
    inset:0;
    background:rgba(7,10,18,.75);
    backdrop-filter:blur(8px);

    display:none;

    justify-content:center;
    align-items:center;

    z-index:99999;
}

.inventory-scan-window{

    width:650px;
    max-width:92%;

    background:#111827;

    border:1px solid rgba(66,133,244,.15);

    border-radius:18px;

    padding:34px;

    box-shadow:
        0 25px 80px rgba(0,0,0,.45);

}

.inventory-scan-header{

    display:flex;

    justify-content:space-between;

    align-items:center;

    margin-bottom:20px;

}

.inventory-scan-header h2{

    font-size:32px;

}

.inventory-scan-header button{

    background:none;

    border:none;

    color:white;

    font-size:32px;

    cursor:pointer;

}

.scan-progress{

    width:100%;

    height:10px;

    background:#1e293b;

    border-radius:999px;

    overflow:hidden;

    margin:30px 0;

}

#scan-progress-bar{

    width:0%;

    height:100%;

    background:#4285F4;

    transition:.35s;

}

.scan-percent{

    display:flex;

    justify-content:space-between;

    margin-bottom:25px;

}

.scan-stage{

    color:#9CA3AF;

    margin-bottom:20px;

}

.scan-timer{

    margin-bottom:30px;

}

.scan-checklist{

    display:flex;

    flex-direction:column;

    gap:14px;

    margin-bottom:35px;

}

.scan-task{

    display:flex;

    align-items:center;

    gap:12px;

}

.scan-task span{

    width:12px;

    height:12px;

    border-radius:50%;

    background:#334155;

}

.scan-task.active span {
    background: #4ea1ff;
    box-shadow: 0 0 14px rgba(78, 161, 255, 0.7);
}

.scan-task.completed span {
    background: #27d17f;
}

#start-inventory-scan:disabled {
    opacity: 0.75;
    cursor: not-allowed;
}

.stat-action-btn {
    margin-top: 12px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 600;
    width: auto;
    min-width: 170px;
    align-self: center;
}