/* ============================================================
   PROFILE — Perfil publico de profissional
   Usa variaveis de styles.css (:root)
   ============================================================ */

/* ── Loading state ──────────────────────────────────────── */
.profile-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    gap: 16px;
}

.profile-loading__spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border, #2d1b4e);
    border-top-color: var(--accent, #6a00ff);
    border-radius: 50%;
    animation: prof-spin 0.8s linear infinite;
}

@keyframes prof-spin {
    to { transform: rotate(360deg); }
}

.profile-loading__text {
    font-size: 0.85rem;
    color: var(--text-muted, #8b7aaa);
    font-weight: 600;
}

/* ── Error state ────────────────────────────────────────── */
.profile-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    gap: 12px;
    text-align: center;
    padding: 32px;
}

.profile-error__icon {
    font-size: 3rem;
    color: var(--text-muted, #8b7aaa);
    opacity: 0.5;
}

.profile-error__title {
    font-family: 'Sora', 'Manrope', sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary, #f5f0ff);
    margin: 0;
}

.profile-error__desc {
    font-size: 0.85rem;
    color: var(--text-muted, #8b7aaa);
    max-width: 380px;
    line-height: 1.6;
    margin: 0;
}

.profile-error__back {
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    height: 38px;
    padding: 0 20px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid var(--border, #2d1b4e);
    color: var(--text-secondary, #c9b8e8);
    background: transparent;
    transition: all 140ms ease;
}

.profile-error__back:hover {
    border-color: var(--border-strong, #3d2565);
    background: rgba(255, 255, 255, 0.02);
}

/* ── Main container ─────────────────────────────────────── */
.public-profile {
    width: min(860px, calc(100% - 32px));
    margin: 0 auto;
    padding: 80px 0 60px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: prof-fadeIn 0.4s ease;
}

@keyframes prof-fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Hero ────────────────────────────────────────────────── */
.prof-hero {
    background: var(--bg-subtle, #140824);
    border: 1px solid var(--border, #2d1b4e);
    border-radius: 16px;
    padding: 32px 32px 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: relative;
    overflow: hidden;
}

.prof-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent, #6a00ff), var(--gold, #ffd700), var(--accent, #6a00ff));
    opacity: 0.6;
}

.prof-hero__top {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.avatar-wrap {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--border-strong, #3d2565);
    flex-shrink: 0;
    position: relative;
    box-shadow: 0 0 20px rgba(106, 0, 255, 0.15);
    transition: border-color 0.3s ease;
}

.avatar-wrap:hover {
    border-color: var(--accent, #6a00ff);
}

.public-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3b0d82, #7c1fc2);
    color: #fff;
    font-family: 'Manrope', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    border-radius: 50%;
    user-select: none;
}

.online-dot {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--success, #34d399);
    border: 3px solid var(--bg-subtle, #140824);
    display: none;
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.4);
}

.online-dot--visible { display: block; }

.prof-hero__info {
    flex: 1;
    min-width: 0;
}

.prof-hero__name-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.prof-hero__name-row h1 {
    font-family: 'Sora', 'Manrope', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary, #f5f0ff);
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: -0.03em;
    margin: 0;
    line-height: 1.2;
}

.verified-badge .material-symbols-rounded {
    font-size: 1rem;
    color: var(--gold, #ffd700);
    filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.3));
}

.prof-rate {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-primary, #f5f0ff);
    white-space: nowrap;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(106, 0, 255, 0.12), rgba(124, 58, 237, 0.08));
    border: 1px solid rgba(106, 0, 255, 0.2);
    border-radius: 8px;
    padding: 5px 14px;
    letter-spacing: -0.01em;
}

.prof-hero__title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary, #c9b8e8);
    margin: 0 0 2px;
    line-height: 1.4;
}

.prof-hero__location {
    font-size: 0.8rem;
    color: var(--text-muted, #8b7aaa);
    font-weight: 500;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 3px;
}

.prof-hero__location .material-symbols-rounded {
    font-size: 0.85rem;
    opacity: 0.6;
}

.identity-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.identity-chips span {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 10px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    background: var(--gold-soft, rgba(255, 215, 0, 0.06));
    color: var(--gold-dim, #b8960f);
    border: 1px solid rgba(255, 215, 0, 0.12);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Stats strip */
.prof-hero__stats {
    display: flex;
    align-items: stretch;
    background: var(--bg, #0b0114);
    border: 1px solid var(--border, #2d1b4e);
    border-radius: 10px;
    overflow: hidden;
}

.prof-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 14px 8px;
    transition: background 0.2s ease;
}

.prof-stat:hover {
    background: rgba(106, 0, 255, 0.04);
}

.prof-stat__value {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary, #f5f0ff);
    letter-spacing: -0.03em;
    line-height: 1;
}

.prof-stat__label {
    font-size: 0.65rem;
    color: var(--text-muted, #8b7aaa);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.prof-stat-sep {
    width: 1px;
    background: var(--border, #2d1b4e);
    flex-shrink: 0;
}

/* Actions */
.prof-hero__actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.prof-hero__actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 42px;
    padding: 0 22px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 180ms ease;
    cursor: pointer;
    border: none;
    font-family: inherit;
    white-space: nowrap;
    letter-spacing: -0.01em;
}

.prof-hero__actions .btn .material-symbols-rounded {
    font-size: 1.1rem;
}

.prof-hero__actions .btn--primary {
    background: linear-gradient(135deg, var(--accent, #6a00ff), var(--accent-strong, #5200cc));
    color: #fff;
    box-shadow: 0 4px 16px rgba(106, 0, 255, 0.25);
}

.prof-hero__actions .btn--primary:hover {
    background: linear-gradient(135deg, #7c10ff, #6200e6);
    box-shadow: 0 6px 24px rgba(106, 0, 255, 0.35);
    transform: translateY(-1px);
}

.prof-hero__actions .btn--primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(106, 0, 255, 0.2);
}

.prof-hero__actions .btn--outline {
    background: transparent;
    border: 1px solid var(--border, #2d1b4e);
    color: var(--text-secondary, #c9b8e8);
}

.prof-hero__actions .btn--outline:hover {
    border-color: var(--border-strong, #3d2565);
    color: var(--text-primary, #f5f0ff);
    background: rgba(255, 255, 255, 0.03);
}

/* Profile menu */
.profile-menu {
    position: relative;
    margin-left: auto;
}

.profile-menu__trigger {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 1px solid var(--border, #2d1b4e);
    background: transparent;
    color: var(--text-muted, #8b7aaa);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    list-style: none;
    transition: all 140ms ease;
}

.profile-menu__trigger:hover {
    border-color: var(--border-strong, #3d2565);
    color: var(--text-secondary, #c9b8e8);
    background: rgba(255, 255, 255, 0.02);
}

.profile-menu__trigger::marker,
.profile-menu__trigger::-webkit-details-marker { display: none; }

.profile-menu__dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 200px;
    background: var(--surface, #1a0e2e);
    border: 1px solid var(--border-strong, #3d2565);
    border-radius: 10px;
    padding: 4px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
    display: none;
    z-index: 20;
}

.profile-menu[open] .profile-menu__dropdown { display: block; }

.profile-menu__item {
    width: 100%;
    padding: 10px 12px;
    border-radius: 7px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary, #c9b8e8);
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    transition: background 120ms ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-menu__item .material-symbols-rounded {
    font-size: 1rem;
    opacity: 0.7;
}

.profile-menu__item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.profile-menu__item--danger {
    color: var(--danger, #ef4444);
}

.profile-menu__item--danger:hover {
    background: rgba(239, 68, 68, 0.06);
}

/* ── Body (single-column sections) ──────────────────────── */
.prof-body {
    background: var(--bg-subtle, #140824);
    border: 1px solid var(--border, #2d1b4e);
    border-radius: 16px;
    overflow: hidden;
}

.prof-section {
    padding: 24px 32px;
    border-bottom: 1px solid var(--border, #2d1b4e);
    transition: background 0.2s ease;
}

.prof-section:last-child { border-bottom: none; }

.prof-section__title {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted, #8b7aaa);
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.prof-section__title .material-symbols-rounded {
    font-size: 0.95rem;
    opacity: 0.6;
}

.prof-short-bio {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary, #c9b8e8);
    margin: 0 0 10px;
    line-height: 1.6;
}

.prof-short-bio:empty { display: none; }

.prof-about-text {
    font-size: 0.9rem;
    color: var(--text-muted, #8b7aaa);
    line-height: 1.8;
    margin: 0;
    white-space: pre-wrap;
}

/* Data empty state */
.data-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    border: 1px dashed var(--border, #2d1b4e);
    border-radius: 10px;
    grid-column: 1 / -1;
}

.data-empty p {
    font-size: 0.82rem;
    color: var(--text-muted, #8b7aaa);
    opacity: 0.7;
}

/* Skills */
.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skills-list .tag {
    display: inline-flex;
    align-items: center;
    height: 30px;
    padding: 0 14px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    background: rgba(106, 0, 255, 0.08);
    color: #9f7ae8;
    border: 1px solid rgba(106, 0, 255, 0.15);
    transition: all 0.2s ease;
}

.skills-list .tag:hover {
    background: rgba(106, 0, 255, 0.14);
    border-color: rgba(106, 0, 255, 0.25);
}

/* Highlights */
.highlight-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.highlight-grid .highlight-card {
    padding: 16px 18px;
    border: 1px solid var(--border, #2d1b4e);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.01);
    transition: all 0.2s ease;
}

.highlight-grid .highlight-card:hover {
    border-color: var(--border-strong, #3d2565);
    background: rgba(255, 255, 255, 0.02);
}

.highlight-grid .highlight-card strong {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary, #f5f0ff);
    margin-bottom: 4px;
}

.highlight-grid .highlight-card p {
    font-size: 0.8rem;
    color: var(--text-muted, #8b7aaa);
    line-height: 1.5;
    margin: 0;
}

/* Portfolio */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}

.portfolio-item {
    border: 1px solid var(--border, #2d1b4e);
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg, #0b0114);
    transition: all 0.25s ease;
}

.portfolio-item:hover {
    border-color: var(--border-strong, #3d2565);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.portfolio-item__media {
    width: 100%;
    aspect-ratio: 1;
    background-size: cover;
    background-position: center;
    background-color: var(--surface, #1a0e2e);
}

.portfolio-item p {
    padding: 10px 12px;
    font-size: 0.78rem;
    color: var(--text-secondary, #c9b8e8);
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
}

/* ── Report modal ────────────────────────────────────────── */
.report-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.report-overlay--open {
    display: flex;
    animation: prof-fadeIn 0.2s ease;
}

.report-modal {
    background: var(--surface, #1a0e2e);
    border: 1px solid var(--border-strong, #3d2565);
    border-radius: 16px;
    padding: 28px;
    width: 100%;
    max-width: 440px;
    margin: 16px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
}

.report-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.report-modal__head h2 {
    font-family: 'Sora', 'Manrope', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary, #f5f0ff);
    margin: 0;
}

.report-modal__close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border, #2d1b4e);
    background: transparent;
    color: var(--text-muted, #8b7aaa);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 140ms ease;
}

.report-modal__close:hover {
    color: var(--text-primary, #f5f0ff);
    border-color: var(--border-strong, #3d2565);
    background: rgba(255, 255, 255, 0.03);
}

.report-field {
    margin-bottom: 16px;
    position: relative;
}

.report-field label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted, #8b7aaa);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.report-field select,
.report-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border, #2d1b4e);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-primary, #f5f0ff);
    font-size: 0.875rem;
    font-family: 'Manrope', 'Segoe UI', sans-serif;
    outline: none;
    transition: border-color 140ms ease;
    box-sizing: border-box;
    resize: vertical;
}

.report-field select:focus,
.report-field textarea:focus {
    border-color: var(--accent, #6a00ff);
    box-shadow: 0 0 0 2px rgba(106, 0, 255, 0.15);
}

.report-field select option {
    background: var(--surface, #1a0e2e);
}

.report-field__counter {
    display: block;
    text-align: right;
    font-size: 0.68rem;
    color: var(--text-muted, #8b7aaa);
    margin-top: 4px;
    opacity: 0.6;
}

.report-submit {
    width: 100%;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent, #6a00ff), var(--accent-strong, #5200cc));
    color: #fff;
    font-size: 0.875rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: all 180ms ease;
    letter-spacing: -0.01em;
}

.report-submit:hover {
    background: linear-gradient(135deg, #7c10ff, #6200e6);
    box-shadow: 0 4px 16px rgba(106, 0, 255, 0.25);
}

.report-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.report-modal__success {
    text-align: center;
    padding: 24px 0;
}

.report-modal__success .material-symbols-rounded {
    font-size: 2.5rem;
    color: var(--success, #34d399);
    margin-bottom: 12px;
    display: block;
}

.report-modal__success p {
    color: var(--text-muted, #8b7aaa);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* ── Mobile ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    .public-profile {
        width: calc(100% - 24px);
        padding: 70px 0 48px;
    }

    .prof-hero {
        padding: 24px 20px 20px;
        gap: 20px;
        border-radius: 14px;
    }

    .prof-hero__top {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 14px;
    }

    .prof-hero__name-row {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .prof-hero__location {
        justify-content: center;
    }

    .identity-chips {
        justify-content: center;
    }

    .avatar-wrap {
        width: 80px;
        height: 80px;
    }

    .prof-hero__name-row h1 {
        font-size: 1.15rem;
    }

    .prof-hero__stats {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .prof-stat-sep {
        display: none;
    }

    .prof-stat {
        padding: 12px 10px;
        border-bottom: 1px solid var(--border, #2d1b4e);
    }

    .prof-stat:nth-child(odd) {
        border-right: 1px solid var(--border, #2d1b4e);
    }

    .prof-stat:nth-last-child(-n+2) {
        border-bottom: none;
    }

    .prof-hero__actions {
        flex-wrap: wrap;
    }

    .prof-hero__actions .btn--primary,
    .prof-hero__actions .btn--outline {
        flex: 1;
        min-width: 140px;
    }

    .prof-section {
        padding: 20px 18px;
    }

    .prof-body {
        border-radius: 14px;
    }

    .highlight-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }
}

@media (max-width: 400px) {
    .public-profile {
        width: calc(100% - 16px);
        padding: 64px 0 40px;
    }

    .prof-hero {
        padding: 20px 14px 16px;
    }

    .prof-hero__actions .btn {
        font-size: 0.78rem;
        height: 38px;
        padding: 0 14px;
    }

    .avatar-wrap {
        width: 68px;
        height: 68px;
    }

    .prof-section {
        padding: 16px 14px;
    }

    .report-modal {
        padding: 20px;
        margin: 12px;
        border-radius: 14px;
    }
}
