/* ==========================================================================
   Euzhan - Profile Module (User Profile & Contracts bento)
   ========================================================================== */

/* Profile Card Container */
.profile-card {
    max-width: 100%;
    margin: 0 auto;
    background: var(--resca-white);
    color: var(--resca-dark);
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
}

@media (max-width: 900px) {
    .profile-card {
        padding: 15px;
        margin: 0;
    }
}

.pencil-trick-container {
    display: block;
    perspective: 1000px;
    margin: -20px 20px 30px 10px;
    text-align: left;
}

/* Avatar Upload & Edit */
.locked-field {
    opacity: 0.7;
    cursor: not-allowed;
    background: var(--resca-grey) !important;
    color: var(--resca-text-muted);
}

.profile-avatar-section {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.profile-avatar-wrapper {
    position: relative;
    display: inline-block;
}

.profile-avatar-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: none;
    margin-bottom: 10px;
    cursor: pointer;
    transition: opacity var(--transition-fast);
    box-shadow: var(--shadow-md);
}

.profile-avatar-img:hover {
    opacity: 0.9;
}

.avatar-edit-icon {
    position: absolute;
    bottom: 10px;
    right: 0;
    width: 32px;
    height: 32px;
    background: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.2s;
}

.avatar-edit-icon:hover {
    transform: scale(1.1);
}

.saving-spinner {
    display: none;
    color: #004d44;
    font-weight: 600;
    font-size: 12px;
    margin-top: 5px;
}

/* --- Contracts Section (Refined List) --- */
.contrats-list {
    background: var(--resca-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    /* Clean look without heavy shadows as requested */
    border: 1px solid var(--resca-border-light);
}

.contrat-item {
    display: block;
    padding: 15px 20px;
    text-decoration: none !important;
    color: var(--resca-dark) !important;
    background: var(--resca-white);
    border-bottom: 1px solid var(--resca-border-light);
    /* Separator line */
    transition: background-color var(--transition-fast);
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

.contrat-item:last-child {
    border-bottom: none;
}

.contrat-item:hover {
    background-color: var(--resca-grey);
}

.contrat-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 3-Column Layout */
.contrat-col-type {
    flex: 1;
    text-align: left;
}

.contrat-col-date {
    flex: 1;
    text-align: center;
}

.contrat-col-status {
    flex: 1;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
    /* Space between pill and chevron */
}

/* Typography */
.contrat-item-title {
    margin: 0;
    color: var(--resca-dark);
    font-size: 16px;
    font-weight: 600;
}

.contrat-item-meta {
    font-size: 14px;
    color: var(--resca-text-muted);
}

/* Status Pill */
.contrat-status-pill {
    display: inline-block;
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    background-color: var(--resca-accent);
    color: var(--resca-dark);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Chevron */
.contrat-item-chevron {
    width: 20px;
    height: 20px;
    color: var(--resca-border);
    transition: color var(--transition-fast);
}

.contrat-item:hover .contrat-item-chevron {
    color: var(--resca-dark);
}

.contrat-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--resca-white);
    border-radius: var(--radius-md);
}

.contrat-empty-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.contrat-empty-text {
    color: var(--resca-text-muted);
    font-size: 16px;
    margin: 0;
}

.gauge-container {
    margin-top: 25px;
}

.gauge-bar-bg {
    margin-top: 10px;
    background: #e9ecef;
    border-radius: 10px;
    height: 20px;
    overflow: hidden;
}

.gauge-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s;
}

.gauge-text {
    margin-top: 8px;
    font-size: 13px;
    color: var(--resca-text-muted);
}

/* Mobile: Stack contract type and date vertically */
@media (max-width: 900px) {
    .contrat-item-header {
        flex-wrap: wrap;
    }

    .contrat-col-type {
        flex: none;
        width: auto;
        margin-right: 15px;
    }

    .contrat-col-date {
        flex: none;
        width: 100%;
        order: 3;
        text-align: left;
        margin-top: 5px;
    }

    .contrat-col-status {
        flex: 1;
        justify-content: flex-end;
    }

    .contrat-item-meta {
        font-size: 12px;
    }
}
