/* ============================================
   Curatery My Space Dashboard — my-space.css
   ============================================ */

/* ── Page wrapper ── */
.ms-page {
    background: #FAF7F2;
    min-height: 80vh;
    font-family: 'DM Sans', sans-serif;
}

.ms-layout {
    max-width: 1100px;
    margin: 0 auto;
    padding: 48px 24px 80px;
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 48px;
    align-items: start;
}

/* ── Page title ── */
.ms-page-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 28px;
    font-weight: 400;
    color: #1E1A0E;
    margin-bottom: 32px;
}

/* ── Sidebar nav ── */
.ms-sidebar {
    position: sticky;
    top: 24px;
}

.ms-nav {
    background: #FAF7F2;
    border: 1px solid #E8D5C0;
    border-radius: 16px;
    overflow: hidden;
}

.ms-nav-user {
    padding: 24px 20px;
    border-bottom: 1px solid #EDE0D0;
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #FDF5EC 0%, #FAF0E4 100%);
}

.ms-nav-avatar {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #E8D5C0;
}

.ms-nav-user-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.ms-nav-name {
    font-size: 14px;
    font-weight: 600;
    color: #1E1A0E;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ms-nav-tier {
    font-size: 11px;
    color: #7A6248;
    font-weight: 400;
}

.ms-nav-tier-club {
    color: #B87E2A;
    font-weight: 500;
}

.ms-nav-list {
    list-style: none;
    padding: 8px 0;
}

.ms-nav-item a {
    display: block;
    padding: 10px 20px;
    font-size: 14px;
    color: #5C4A32;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.ms-nav-item a:hover {
    background: #EDE0D0;
    color: #1E1A0E;
}

.ms-nav-item.active a {
    background: #1E1A0E;
    color: #FAF7F2;
    font-weight: 500;
}

.ms-nav-footer {
    padding: 12px 20px 16px;
    border-top: 1px solid #EDE0D0;
}

.ms-nav-logout {
    font-size: 12px;
    color: #B0987E;
    text-decoration: none;
    transition: color 0.15s;
}

.ms-nav-logout:hover { color: #7A6248; }

/* ── Main content ── */
.ms-main { min-width: 0; }

/* ── Cards ── */
.ms-card {
    background: #FFFFFF;
    border: 1px solid #E8D5C0;
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 24px;
}

.ms-card-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 18px;
    font-weight: 400;
    color: #1E1A0E;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ms-card-title a {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    color: #B87E2A;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 400;
}

/* ── Membership card ── */
.ms-membership-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #1E1A0E;
    color: #D4A843;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 100px;
    margin-bottom: 16px;
}

.ms-membership-free {
    background: #EDE0D0;
    color: #5C4A32;
}

.ms-membership-detail {
    font-size: 13px;
    color: #7A6248;
    line-height: 1.6;
    margin-bottom: 8px;
}

.ms-membership-detail strong {
    color: #1E1A0E;
}

.ms-upgrade-btn {
    display: inline-block;
    margin-top: 16px;
    background: #D4A843;
    color: #1E1A0E;
    font-size: 13px;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s;
}

.ms-upgrade-btn:hover { background: #E8C06A; }

/* ── Points card ── */
.ms-points-balance {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 52px;
    font-weight: 400;
    color: #1E1A0E;
    line-height: 1;
    margin-bottom: 6px;
}

.ms-points-label {
    font-size: 13px;
    color: #7A6248;
    margin-bottom: 24px;
}

/* Progress bars */
.ms-progress-wrap {
    margin-bottom: 20px;
}

.ms-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
}

.ms-progress-label {
    font-size: 13px;
    color: #5C4A32;
    font-weight: 500;
}

.ms-progress-value {
    font-size: 12px;
    color: #B0987E;
}

.ms-progress-bar {
    height: 8px;
    background: #EDE0D0;
    border-radius: 100px;
    overflow: hidden;
}

.ms-progress-fill {
    height: 100%;
    background: #D4A843;
    border-radius: 100px;
    transition: width 0.4s ease;
}

.ms-progress-fill-green {
    background: #2A7D4F;
}

/* Redeem buttons */
.ms-redeem-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 24px;
}

.ms-redeem-btn {
    background: #FAF7F2;
    border: 1px solid #E8D5C0;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    font-family: 'DM Sans', sans-serif;
}

.ms-redeem-btn:hover:not(:disabled) {
    border-color: #D4A843;
    background: #FDF5EC;
}

.ms-redeem-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ms-redeem-pts {
    font-size: 20px;
    font-weight: 600;
    color: #D4A843;
    display: block;
    margin-bottom: 4px;
}

.ms-redeem-name {
    font-size: 12px;
    color: #5C4A32;
    display: block;
}

/* Coupon reveal */
.ms-coupon-reveal {
    margin-top: 12px;
    background: #1E1A0E;
    color: #D4A843;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-align: center;
    display: none;
}

.ms-coupon-reveal.visible { display: block; }

.ms-coupon-expiry {
    font-size: 11px;
    color: #7A6248;
    text-align: center;
    margin-top: 6px;
    font-weight: 400;
    letter-spacing: 0;
}

/* ── Streak card ── */
.ms-streak-count {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 52px;
    font-weight: 400;
    color: #1E1A0E;
    line-height: 1;
    margin-bottom: 4px;
}

.ms-streak-label {
    font-size: 13px;
    color: #7A6248;
    margin-bottom: 20px;
}

.ms-streak-milestones {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.ms-streak-milestone {
    flex: 1;
    text-align: center;
    padding: 10px 6px;
    border-radius: 8px;
    border: 1px solid #E8D5C0;
    background: #FAF7F2;
}

.ms-streak-milestone.reached {
    background: #1E1A0E;
    border-color: #1E1A0E;
}

.ms-streak-milestone-days {
    font-size: 16px;
    font-weight: 600;
    color: #5C4A32;
    display: block;
}

.ms-streak-milestone.reached .ms-streak-milestone-days {
    color: #D4A843;
}

.ms-streak-milestone-label {
    font-size: 10px;
    color: #B0987E;
    display: block;
    margin-top: 2px;
}

.ms-streak-milestone.reached .ms-streak-milestone-label {
    color: #7A6248;
}

/* ── Review credits card ── */
.ms-review-credit-count {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 40px;
    font-weight: 400;
    color: #1E1A0E;
    line-height: 1;
    margin-bottom: 4px;
}

.ms-review-credit-label {
    font-size: 13px;
    color: #7A6248;
    margin-bottom: 20px;
}

.ms-redeem-credit-btn {
    display: inline-block;
    background: #2A7D4F;
    color: #FAF7F2;
    font-size: 13px;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    font-family: 'DM Sans', sans-serif;
    margin-top: 8px;
}

.ms-redeem-credit-btn:hover { background: #236840; }
.ms-redeem-credit-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Downloads list ── */
.ms-downloads-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ms-download-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px;
    background: #FAF7F2;
    border: 1px solid #EDE0D0;
    border-radius: 12px;
    text-decoration: none;
    transition: border-color 0.15s;
}

.ms-download-item:hover { border-color: #D4A843; }

.ms-download-thumb {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: #EDE0D0;
}

.ms-download-thumb-placeholder {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    background: #EDE0D0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ms-download-info { flex: 1; min-width: 0; }

.ms-download-title {
    font-size: 14px;
    font-weight: 500;
    color: #1E1A0E;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ms-download-meta {
    font-size: 12px;
    color: #B0987E;
}

.ms-download-price {
    font-size: 13px;
    font-weight: 500;
    color: #5C4A32;
    flex-shrink: 0;
}

.ms-empty {
    text-align: center;
    padding: 48px 24px;
    color: #7A6248;
}

.ms-empty h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 8px;
    color: #1E1A0E;
}

.ms-empty p { font-size: 14px; line-height: 1.65; }

/* ── Two column grid for cards ── */
.ms-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

/* ── Responsive ── */
@media ( max-width: 768px ) {
    .ms-layout {
        grid-template-columns: 1fr;
        padding: 24px 20px 48px;
        gap: 24px;
    }
    .ms-sidebar { position: static; }
    .ms-card-grid { grid-template-columns: 1fr; }
    .ms-redeem-row { grid-template-columns: 1fr; }
    .ms-streak-milestones { gap: 6px; }
}
