/* Ecrãs de perfil (admin / cliente / colaborador) — alinhado com a página inicial e o login */
.profile {
    font-family: 'Raleway', sans-serif;
    margin: 0 auto;
    max-width: 760px;
}

.profile .profile-hero {
    align-items: center;
    background: #fff;
    border: 1px solid #e3e5e8;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .05);
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    padding: 18px;
}

.profile .avatar {
    align-items: center;
    background: #8c1c13;
    border-radius: 50%;
    color: #fff;
    display: flex;
    flex: 0 0 76px;
    font-size: 28px;
    font-weight: 700;
    height: 76px;
    justify-content: center;
    overflow: hidden;
    position: relative;
    width: 76px;
}

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

.profile label.avatar-upload {
    cursor: pointer;
    margin: 0;
}

.profile .avatar-upload .avatar-edit {
    background: rgba(0, 0, 0, .55);
    bottom: 0;
    color: #fff;
    font-size: 11px;
    left: 0;
    padding: 3px 0;
    position: absolute;
    right: 0;
    text-align: center;
}

.profile .avatar-upload input[type=file] {
    display: none;
}

.profile .hero-info h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 4px;
    word-break: break-word;
}

.profile .hero-info .hero-sub {
    color: #777;
    overflow-wrap: anywhere;
}

.profile .hero-info .label {
    display: inline-block;
    font-weight: 600;
    margin: 6px 4px 0 0;
}

.profile .profile-card {
    background: #fff;
    border: 1px solid #e3e5e8;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .05);
    margin-bottom: 16px;
    padding: 18px;
}

.profile .profile-card h3 {
    align-items: center;
    color: #8c1c13;
    display: flex;
    font-size: 13px;
    font-weight: 700;
    gap: 8px;
    letter-spacing: .08rem;
    margin: 0 0 16px;
    text-transform: uppercase;
}

.profile .form-group {
    margin-bottom: 14px;
}

.profile .profile-card label {
    color: #666;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
}

.profile .form-control {
    border-color: #dcdfe3;
    border-radius: 6px;
    box-shadow: none;
    height: 44px;
}

.profile textarea.form-control {
    height: auto;
}

.profile .form-control:focus {
    border-color: #8c1c13;
    box-shadow: 0 0 0 3px rgba(140, 28, 19, .12);
}

.profile .has-error .form-control {
    border-color: #dd4b39;
}

.profile .pw-field {
    position: relative;
}

.profile .pw-field .form-control {
    padding-right: 44px;
}

.profile .pw-field .pw-toggle {
    align-items: center;
    background: none;
    border: 0;
    bottom: 0;
    color: #888;
    display: flex;
    justify-content: center;
    position: absolute;
    right: 0;
    top: 0;
    width: 44px;
}

.profile .btn-link-toggle {
    color: #8c1c13;
    font-weight: 600;
    padding: 0;
}

.profile .hint {
    color: #999;
    font-size: 12px;
    margin-top: 4px;
}

.profile .profile-actions {
    background: rgba(245, 246, 248, .95);
    border-top: 1px solid #e3e5e8;
    bottom: 0;
    margin: 0 -15px;
    padding: 12px 15px;
    position: sticky;
    z-index: 10;
}

.profile .btn-primary {
    background: #8c1c13;
    border-color: #8c1c13;
    border-radius: 6px;
    font-weight: 600;
    height: 46px;
}

.profile .btn-primary:hover,
.profile .btn-primary:focus {
    background: #741610;
    border-color: #741610;
}

.profile .btn-success {
    background: #8c1c13;
    border-color: #8c1c13;
    border-radius: 6px;
    font-weight: 600;
    height: 46px;
    padding: 0 28px;
}

@media (max-width: 767px) {
    .profile .profile-hero {
        flex-direction: column;
        text-align: center;
    }

    .profile .profile-card {
        padding: 14px;
    }
}

/* Select2 no mesmo formato dos restantes campos */
.profile .select2-container {
    width: 100% !important;
}

.profile .select2-container--default .select2-selection--single {
    border: 1px solid #dcdfe3;
    border-radius: 6px;
    height: 44px;
}

.profile .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 42px;
    padding-left: 12px;
}

.profile .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 42px;
}

.profile .select2-container--default.select2-container--focus .select2-selection--single,
.profile .select2-container--default.select2-container--open .select2-selection--single {
    border-color: #8c1c13;
    box-shadow: 0 0 0 3px rgba(140, 28, 19, .12);
}

.profile .has-error .select2-selection--single {
    border-color: #dd4b39;
}

/* Prefixo do valor em euros */
.profile .input-group-addon {
    background: #f7f7f8;
    border-color: #dcdfe3;
    border-radius: 6px 0 0 6px;
    color: #777;
}

.profile .input-group .form-control {
    border-radius: 0 6px 6px 0;
}

/* Zona de anexo */
.profile .file-drop {
    background: #fafafa;
    border: 2px dashed #dcdfe3;
    border-radius: 8px;
    cursor: pointer;
    display: block;
    margin: 0;
    padding: 22px 14px;
    text-align: center;
}

.profile .file-drop:hover,
.profile .file-drop.has-file {
    border-color: #8c1c13;
}

.profile .file-drop input[type=file] {
    display: none;
}

.profile .file-drop .file-name {
    color: #8c1c13;
    display: block;
    font-weight: 600;
    margin-top: 4px;
    word-break: break-all;
}
