.profile-row {
    display: grid;
    grid-template-columns: 1fr 260px;
    grid-template-rows: auto auto;
    gap: 16px;
    align-items: start;
    position: relative;
}

.profile-row > .profile-card {
    grid-column: 1;
    grid-row: 1;
}

.profile-row > .achievements-panel {
    grid-column: 2;
    grid-row: 1 / 3;
    width: 260px;
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255,255,255,0.06);
    transition: border-color 0.3s;
}

.profile-row > .profile-actions {
    grid-column: 1;
    grid-row: 2;
}

/* Panel tabs - match .tab style from site */
.ach-panel-tabs {
    display: flex;
    gap: 0;
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 6px;
}

.ach-panel-tab {
    flex: 1;
    padding: 8px 0;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: #555;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Farabee', Arial, sans-serif;
}

.ach-panel-tab:hover {
    color: #888;
}

/* Locked message */
.ach-locked-msg {
    font-size: 10px;
    color: #666;
    text-align: center;
    padding: 8px 0;
    line-height: 1.4;
}

.ach-locked-msg a {
    color: #8A2BE2;
    text-decoration: none;
    font-weight: 600;
}

.ach-locked-msg a:hover {
    text-decoration: underline;
}

/* Level number - big, bold like .stat-value */
.ach-level-num {
    font-size: 34px;
    font-weight: 900;
    line-height: 1;
    margin-top: 2px;
    color: #fff;
}

.ach-level-label {
    font-size: 10px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

/* Level label - uppercase label like .stat-label */
.ach-level-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

/* Badge row */
.ach-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    justify-content: center;
}

.ach-medal {
    font-size: 24px;
    cursor: help;
    transition: transform 0.2s;
    line-height: 1;
}

.ach-medal:hover {
    transform: scale(1.2);
}

/* Outline button - matches .btn-dashboard style */
.ach-btn-outline {
    background: rgba(255,255,255,0.05);
    color: #fff;
    border: 1px solid rgba(162,255,0,0.3);
    padding: 5px 14px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    white-space: nowrap;
    font-family: 'Farabee', Arial, sans-serif;
    width: 100%;
}

.achievements-panel[data-role="choreographer"] .ach-btn-outline:hover,
.ach-btn-outline[data-role="choreographer"]:hover {
    background: rgba(138,43,226,0.12);
    border-color: #8A2BE2;
    box-shadow: 0 0 20px rgba(138,43,226,0.2);
    transform: translateY(-2px);
}

.achievements-panel[data-role="dancer"] .ach-btn-outline:hover,
.ach-btn-outline:hover {
    background: rgba(162,255,0,0.1);
    border-color: #a2ff00;
    box-shadow: 0 0 20px rgba(162,255,0,0.2);
    transform: translateY(-2px);
}

.ach-btn-outline:active {
    transform: translateY(0);
}

/* Modal overlay */
.ach-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.ach-modal-overlay.ach-show {
    opacity: 1;
    pointer-events: auto;
}

/* Modal window - matches .modal-window-inner */
.ach-modal {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 20px;
    width: 90%;
    max-width: 440px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 0;
    transform: translateY(20px);
    transition: transform 0.3s;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.ach-show .ach-modal {
    transform: translateY(0);
}

.ach-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 24px;
    border-bottom: 1px solid #222;
}

.ach-level-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ach-level-badge {
    display: inline-block;
    color: white;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    width: fit-content;
}

.ach-level-title {
    color: #fff;
    font-size: 22px;
    font-weight: 900;
}

.ach-progress-bar {
    width: 100%;
    height: 6px;
    background: #222;
    border-radius: 3px;
    overflow: hidden;
}

.ach-progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s;
}

.ach-xp-text {
    color: #666;
    font-size: 12px;
}

.ach-close-btn {
    background: none;
    border: none;
    color: #555;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
}

.ach-close-btn:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
}

/* Role label in modal */
.ach-role-label {
    text-align: center;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 24px 0;
    font-weight: 600;
}

/* Achievement list */
.ach-list {
    padding: 8px 24px 20px;
}

.ach-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.ach-item:last-child {
    border-bottom: none;
}

.ach-item-icon {
    font-size: 30px;
    width: 40px;
    text-align: center;
    flex-shrink: 0;
}

.ach-item-name {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.ach-item-desc {
    color: #666;
    font-size: 12px;
    margin-top: 2px;
}

.ach-item-xp {
    color: #4caf50;
    font-size: 11px;
    margin-top: 4px;
}

.ach-item-locked .ach-item-name {
    color: #444;
}

.ach-item-locked .ach-item-desc {
    color: #333;
}

/* Tabs in leaderboard modal - matches .tab style */
.ach-tabs {
    display: flex;
    gap: 0;
}

.ach-tab {
    padding: 8px 18px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: #888;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Farabee', Arial, sans-serif;
}

.ach-tab:hover {
    color: #ccc;
}

/* Leaderboard list */
.ach-leaderboard-body {
    min-height: 100px;
}

.ach-loading {
    color: #555;
    text-align: center;
    padding: 30px;
}

.ach-lb-list {
    padding: 8px 24px 20px;
}

.ach-lb-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.ach-lb-rank {
    width: 32px;
    text-align: center;
    font-size: 14px;
    color: #666;
}

.ach-lb-name {
    flex: 1;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
}

.ach-lb-level {
    font-weight: 700;
    font-size: 13px;
}

.ach-lb-xp {
    color: #888;
    font-size: 12px;
}

@media (max-width: 768px) {
    .profile-row {
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: calc(100% + 30px);
        margin-left: -15px;
        margin-right: -15px;
    }
    .profile-row > .profile-card {
        order: -2;
    }
    .profile-row > .achievements-panel {
        order: -1;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        padding: 12px;
        gap: 6px;
    }
    .profile-row > .profile-actions {
        order: 0;
    }
    .profile-card {
        padding: 16px;
        gap: 12px;
    }
    .ach-panel-tabs {
        width: 100%;
    }
    .ach-level-num {
        font-size: 24px;
    }
    .ach-level-label {
        font-size: 9px;
    }
    .ach-btn-outline {
        font-size: 10px;
        padding: 4px 12px;
    }
    .ach-modal {
        width: 95%;
        max-height: 90vh;
    }
    .ach-modal-header {
        padding: 14px 16px;
    }
    .ach-level-title {
        font-size: 18px;
    }
    .ach-list {
        padding: 6px 16px 16px;
    }
    .ach-item {
        padding: 10px 0;
        gap: 10px;
    }
    .ach-item-icon {
        font-size: 24px;
        width: 32px;
    }
    .ach-lb-list {
        padding: 6px 16px 16px;
    }
    .ach-lb-row {
        padding: 8px 0;
        gap: 6px;
    }
}
