/* ==============================================
   마이페이지 공통 (사이드바 + 레이아웃)
   shop-edit / myshop / mypage / profile / point 등에서 공통 사용
   ============================================== */

.my-wrap { padding: 24px 20px 60px; }
.my-layout { display: flex; gap: 24px; align-items: flex-start; }
.my-side { width: 240px; flex-shrink: 0; }
.my-main { flex: 1; min-width: 0; }

/* === 사이드 프로필 헤더 === */
.my-profile {
    background: #fff; border: 1px solid var(--border-light);
    border-radius: 12px; padding: 18px; margin-bottom: 12px;
    display: flex; align-items: center; gap: 12px;
    position: sticky; top: 120px; z-index: 1;
}
.my-avatar {
    width: 48px; height: 48px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff; font-weight: 800; font-size: 20px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.my-profile-info { min-width: 0; flex: 1; }
.my-profile-info strong {
    display: block; font-size: 15px; font-weight: 800;
    color: var(--text-dark); margin-bottom: 4px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.my-profile-info small {
    display: block; font-size: 11px; color: var(--text-muted); margin-top: 3px;
}
.my-profile-info small i { color: var(--primary); margin-right: 2px; }

.my-grade {
    display: inline-block; padding: 2px 8px; border-radius: 10px;
    font-size: 10px; font-weight: 800; color: #fff; letter-spacing: 0.5px;
}
.my-grade-bronze { background: #cd7f32; }
.my-grade-silver { background: #94a3b8; }
.my-grade-gold { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.my-grade-platinum { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.my-grade-diamond { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.my-grade-vip { background: linear-gradient(135deg, #dc2626, #991b1b); }

/* === 사이드 네비 === */
.my-nav {
    background: #fff; border: 1px solid var(--border-light);
    border-radius: 12px; overflow: hidden;
    position: sticky; top: 210px;
}
.my-nav a {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 16px; font-size: 14px;
    color: var(--text-secondary); text-decoration: none;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.15s, color 0.15s, padding 0.15s;
    position: relative;
}
.my-nav a:last-child { border-bottom: none; }
.my-nav a:hover { background: var(--bg-light); color: var(--text-dark); }
.my-nav a.active {
    background: var(--primary-bg);
    color: var(--primary-dark);
    font-weight: 700;
    border-left: 3px solid var(--primary);
    padding-left: 13px;
}
.my-nav a i { width: 16px; text-align: center; font-size: 13px; flex-shrink: 0; }

.my-nav-section {
    padding: 10px 16px 6px;
    font-size: 11px; font-weight: 800;
    color: var(--text-muted); letter-spacing: 0.5px;
    background: var(--bg-section);
    border-bottom: 1px solid var(--border-light);
    text-transform: uppercase;
}

.my-nav-badge {
    margin-left: auto;
    background: var(--danger); color: #fff;
    font-size: 10px; font-weight: 800;
    padding: 1px 7px; border-radius: 9px;
    display: inline-flex; align-items: center; gap: 3px;
}
.my-nav-badge i { font-size: 9px; }
.my-nav-badge.urgent { background: #dc2626; animation: nvPulse 1.8s ease-in-out infinite; }
.my-nav-badge.warn { background: #f59e0b; }
@keyframes nvPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(220,38,38,0.5); } 50% { box-shadow: 0 0 0 6px rgba(220,38,38,0); } }
.my-nav-preview { color: #2563eb !important; }
.my-nav-preview:hover { background: #dbeafe !important; }
.my-nav-danger { color: var(--danger) !important; }

/* === 공통 페이지 헤더 === */
.my-page-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px; flex-wrap: wrap; gap: 12px;
}
.my-page-head h1 {
    font-size: 22px; font-weight: 800; color: var(--text-dark);
    display: flex; align-items: center; gap: 10px;
}
.my-page-head h1 i { color: var(--primary); font-size: 18px; }
.my-page-head p { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* === 등급 진행 카드 (mypage용) === */
.my-grade-card {
    background: linear-gradient(135deg, #fff8f0 0%, #fef3c7 100%);
    border: 1px solid #fbbf24;
    border-radius: 12px; padding: 18px 20px;
    margin-bottom: 16px;
}
.my-grade-top {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 14px;
}
.my-grade-top > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.my-grade-current {
    display: inline-block; padding: 5px 12px;
    background: linear-gradient(135deg, #fbbf24, #d97706);
    color: #fff; border-radius: 14px;
    font-size: 12px; font-weight: 800; letter-spacing: 0.3px;
}
.my-grade-arrow { color: #d97706; font-size: 11px; }
.my-grade-arrow i { opacity: 0.6; }
.my-grade-next {
    display: inline-block; padding: 5px 12px;
    background: #fff; color: #92400e;
    border: 1.5px dashed #fbbf24; border-radius: 14px;
    font-size: 12px; font-weight: 700;
}
.my-grade-point {
    font-size: 20px; font-weight: 900;
    color: #d97706; letter-spacing: -0.5px;
}
.my-grade-bar {
    height: 10px; background: rgba(255,255,255,0.7);
    border-radius: 5px; overflow: hidden;
    margin-bottom: 10px;
    border: 1px solid rgba(217,119,6,0.2);
}
.my-grade-fill {
    height: 100%;
    background: linear-gradient(90deg, #fbbf24, #d97706);
    border-radius: 5px;
    transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 0 8px rgba(251,191,36,0.35);
}
.my-grade-detail {
    display: flex; justify-content: space-between; gap: 10px;
    font-size: 11px; color: #78350f; font-weight: 600;
    flex-wrap: wrap;
}
.my-grade-detail span { white-space: nowrap; }

.my-grade-badge {
    display: inline-block; padding: 3px 10px;
    border-radius: 10px;
    font-size: 10px; font-weight: 800; color: #fff;
    letter-spacing: 0.3px;
    background: var(--text-muted);
}

/* === 공통 카드 === */
.my-card {
    background: #fff; border: 1px solid var(--border-light);
    border-radius: 12px; padding: 24px;
    margin-bottom: 16px;
}
.my-card-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 16px; padding-bottom: 14px;
    border-bottom: 1px solid var(--border-light);
}
.my-card-head h2 {
    font-size: 16px; font-weight: 800; color: var(--text-dark);
    display: flex; align-items: center; gap: 8px;
}
.my-card-head h2 i { color: var(--primary); font-size: 14px; }

/* === 모바일 === */
@media (max-width: 900px) {
    .my-layout { flex-direction: column; gap: 12px; align-items: stretch; }
    .my-side { width: 100%; }
    .my-main { width: 100%; min-width: 0; max-width: 100%; }
    .my-profile { position: static; margin-bottom: 10px; }
    .my-nav { position: static; }
    .my-nav-section { display: none; }
    .my-nav {
        display: flex; overflow-x: auto;
        scrollbar-width: none;
    }
    .my-nav::-webkit-scrollbar { display: none; }
    .my-nav a {
        flex-direction: column; gap: 4px;
        padding: 10px 14px; font-size: 11px;
        white-space: nowrap; border-bottom: none;
        border-right: 1px solid var(--border-light);
        min-width: 68px; text-align: center;
    }
    .my-nav a.active { border-left: none; border-bottom: 3px solid var(--primary); padding-left: 14px; }
    .my-nav a i { width: auto; font-size: 15px; }
    .my-nav-badge { position: absolute; top: 4px; right: 8px; margin-left: 0; }
}
@media (max-width: 380px) {
    .my-wrap { padding: 14px 10px 40px !important; }
    .my-profile { padding: 14px; gap: 10px; }
    .my-avatar { width: 44px; height: 44px; font-size: 18px; }
    .my-profile-info strong { font-size: 14px; }
    .my-nav a { min-width: 58px; padding: 8px 10px; font-size: 10px; }
    .my-nav a i { font-size: 14px; }
}
