/* User profile page */

.user-profile {
    max-width: 960px;
}

.user-profile__top {
    margin-bottom: 20px;
}

.user-profile__card {
    margin-bottom: 20px;
}

.user-profile__top > .user-profile__card {
    margin-bottom: 0;
    width: 100%;
}

.user-profile__card--company {
    padding: 22px 24px;
}

.user-profile__card--company .giana-form-section__title {
    margin: 0 0 16px;
}

.user-profile__company-box {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--surface-alt, #f5f0fa);
    border: 1px solid var(--border, #ece4f3);
    border-radius: var(--radius-plate, 10px);
}

.user-profile__company-logo {
    position: relative;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: transparent;
    overflow: hidden;
}

.user-profile__company-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.user-profile__company-logo-fallback {
    font-family: var(--font-ui, 'Open Sans', sans-serif);
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-muted, #8b7f9b);
}

.user-profile__company-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-profile__company-name {
    font-family: var(--font-display, 'DM Sans', sans-serif);
    font-size: 15px;
    font-weight: 700;
    color: var(--ink, #2b1b44);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-profile__company-note {
    margin: 0;
    font-family: var(--font-ui, 'Open Sans', sans-serif);
    font-size: 13px;
    line-height: 1.4;
    color: var(--ink-muted, #8b7f9b);
}

.user-profile__invite-create {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem;
    margin: 0.75rem 0 1rem;
}

.user-profile__invite-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.user-profile__invite-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-top: 1px solid var(--border, #ece4f3);
}

.user-profile__invite-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    flex: 1;
}

.user-profile__invite-email {
    font-size: 14px;
    font-weight: 500;
    word-break: break-all;
}

.user-profile__invite-token {
    font-size: 12px;
    word-break: break-all;
}

.user-profile__invite-confirm {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--surface-muted, #f7f4fa);
    border-radius: 8px;
}

.user-profile__identity {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    margin-bottom: 22px;
    padding: 6px; /* room for drag highlight ring inside overflow:hidden parent */
}

.user-profile__avatar.giana-avatar {
    position: relative;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    font-family: var(--font-ui, 'Open Sans', 'Roboto', sans-serif);
    font-size: 26px;
    font-weight: 500;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 0 0 1px var(--border, #ece4f3);
    transition: box-shadow var(--transition, 0.15s ease);
}

.user-profile__avatar-face {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    font: inherit;
}

.user-profile__avatar-face img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.user-profile__avatar-drop {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
    background: rgba(45, 27, 78, 0.72);
    color: #fff;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition, 0.15s ease);
    z-index: 1;
}

.user-profile__avatar-drop-label {
    font-family: var(--font-ui, 'Open Sans', sans-serif);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
}

.user-profile__avatar.is-dragover {
    /* white ring so it reads on purple avatar + photo */
    box-shadow:
        0 0 0 3px #fff,
        0 0 0 6px var(--primary, #2d1b4e);
}

.user-profile__avatar.is-dragover .user-profile__avatar-drop {
    opacity: 1;
}

.user-profile__drop-hint {
    margin: 10px 0 0;
    font-family: var(--font-ui, 'Open Sans', sans-serif);
    font-size: 13px;
    line-height: 1.4;
    color: var(--ink-muted, #8b7f9b);
}

.user-profile__avatar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.user-profile__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}

.user-profile__actions {
    margin-top: 8px;
}

.user-profile__logout-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.user-profile__card--danger .giana-form-section__title {
    color: var(--ink, #2b1b44);
}

@media (max-width: 640px) {
    .user-profile__grid {
        grid-template-columns: 1fr;
    }
}
