/* ═══════════════════════════════════════════════════
   MINDSET+ | PROFILE & SETTINGS — STYLESHEET
   Inherits from app.css + styles.css
   ═══════════════════════════════════════════════════ */

/* ── Layout ── */
.profile-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: start;
}

/* ── Profile Sidebar Card ── */
.profile-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: sticky;
    top: 2rem;
}

.profile-avatar-large {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    margin-bottom: 1.25rem;
    flex-shrink: 0;
}

.avatar-edit-btn {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    transition: transform 0.2s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.avatar-edit-btn:hover {
    transform: scale(1.15);
}

.avatar-upload-status {
    min-height: 1.1rem;
    margin-top: -0.8rem;
    margin-bottom: 1rem;
    color: var(--accent-cyan);
    font-size: 0.76rem;
}

.profile-info {
    margin-bottom: 1.5rem;
}

.profile-info h2 {
    font-family: var(--font-heading);
    margin-bottom: 0.4rem;
}

.profile-info p {
    font-size: 0.85rem;
    margin: 0;
}

/* ── Profile Sub-nav ── */
.profile-nav {
    /* Reset global nav tag styles */
    position: static;
    top: auto;
    left: auto;
    z-index: auto;
    background: transparent;
    backdrop-filter: none;
    border-bottom: none;
    padding-bottom: 0;

    /* Custom sidebar nav styles */
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    border-top: 1px solid var(--glass-border);
    padding-top: 1.5rem;
    margin-top: 0.5rem;
}

.profile-nav-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.25s ease;
    border: 1px solid transparent;
    text-align: left;
}

.profile-nav-item:hover {
    background: rgba(255,255,255,0.04);
    color: #fff;
    border-color: var(--glass-border);
}

.profile-nav-item.active {
    background: rgba(34, 197, 94,0.1);
    color: var(--accent-blue);
    border-color: rgba(34, 197, 94,0.3);
}

.profile-nav-item i {
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* ── Content Sections ── */
.profile-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.content-section {
    border-radius: 20px;
    padding: 2rem;
    transition: box-shadow 0.3s ease;
}

.content-section:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.section-header h3 {
    font-size: 1.25rem;
    font-family: var(--font-heading);
    font-weight: 600;
    color: #fff;
    margin: 0;
}

/* ── Settings Form ── */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    box-sizing: border-box;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent-blue);
    background: rgba(34, 197, 94,0.05);
    box-shadow: 0 0 0 3px rgba(34, 197, 94,0.12);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

/* ── Save Button ── */
.btn-save {
    border: none;
    padding: 0.65rem 1.75rem;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.02em;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(34, 197, 94,0.35);
}

/* ── Benchmarking Chart ── */
.benchmarking-container {
    height: 220px;
    width: 100%;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding-bottom: 0;
    margin-bottom: 2rem;
}

.bar {
    flex: 1;
    border-radius: 6px 6px 0 0;
    position: relative;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.bar:hover {
    opacity: 0.85;
    transform: scaleY(1.02);
    transform-origin: bottom;
}

.bar::after {
    content: attr(data-month);
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    color: var(--text-muted);
    white-space: nowrap;
    font-weight: 500;
    letter-spacing: 0.05em;
}

.benchmark-tooltip {
    position: absolute;
    z-index: 9999;
    transform: translateX(-50%);
    background: #101827;
    color: #fff;
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    font-size: 0.75rem;
    font-weight: 600;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

/* ── Interest Pills ── */
.interest-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.interest-pill {
    padding: 0.55rem 1.1rem;
    border-radius: 100px;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.25s ease;
    user-select: none;
    font-weight: 500;
}

.interest-pill:hover {
    transform: translateY(-2px);
}

/* ── Stats Row ── */
.profile-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.profile-stat {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.2s ease;
}

.profile-stat:hover {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.1);
}

.profile-stat .stat-val {
    font-size: 2rem;
    font-family: var(--font-heading);
    font-weight: 700;
    color: #fff;
    line-height: 1;
    margin-bottom: 0.35rem;
}

.profile-stat .stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

/* ── Achievement Badges ── */
.badges-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 1rem;
    border-radius: 16px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--glass-border);
    flex: 1;
    min-width: 100px;
    cursor: default;
    transition: all 0.25s ease;
}

.badge:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.badge i {
    font-size: 2rem;
}

.badge-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-align: center;
    font-weight: 500;
}

.badge.earned {
    background: rgba(251,191,36,0.06);
    border-color: rgba(251,191,36,0.25);
}

.badge.earned .badge-label {
    color: #fff;
}

.notif-pref-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    transition: background 0.2s, border-color 0.2s;
    cursor: pointer;
}

.notif-pref-row:hover {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.12);
}

.pref-toggle {
    width: 44px;
    height: 24px;
    background: rgba(255,255,255,0.1);
    border-radius: 100px;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.1);
    transition: background 0.3s, border-color 0.3s;
}

.pref-toggle::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    top: 2px;
    left: 3px;
    transition: left 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.pref-toggle.on {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
}

.pref-toggle.on::after {
    left: 23px;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .profile-layout {
        grid-template-columns: 240px 1fr;
    }
}

@media (max-width: 800px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }
    .profile-sidebar {
        position: static;
    }
    .settings-grid {
        grid-template-columns: 1fr;
    }
    .profile-stats-row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 500px) {
    .profile-stats-row {
        grid-template-columns: 1fr;
    }
}
